cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Multiple Default Text If Statement

Greetings, I am working on canvas app from a sharepoint list. It is a updated daily request type app. I have a datacard text input that has a default but I need it to update it when a popup (Mini request) sections is filled out. I need an if statement or update that has default text if new but if a section is updated in the popup then Updated text.  I have tried several different kinds of approaches and nothing. The trigger was a button but as soon as it is not pressed and released it reverts back to the default. Any ideas or workarounds would be most appreciated. 

 

 

Now:  If(EditForm1.Mode = FormMode.New, "N/A",Parent.Default)
 
Need integrated (Updated text): Concat(Requestgal, RequestItems, " ,")
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @KHenderson ,

Do you want to display default value of the textinput in these three situations:

1)form mode is new and not fill out the pop-up window : "N/A"

2)form mode is new and  fill out the pop-up window : Concat(Requestgal, RequestItems, " ,")

3)form mode is edit: Parent.Default

If so, I suggest you use a variable to justify whether you fill out the pop-up window.

Try this:
set the screen's OnVisible:

Set(fillout,false)

set the tabs and toggles inside the pop-up  OnSelect:

Set(fillout,true)

set the textinput's Default:

If(!fillout&&EditForm1.Mode = FormMode.New, 
   "N/A",
   fillout&&EditForm1.Mode = FormMode.New, 
   Concat(Requestgal, RequestItems, " ,") ,
   EditForm1.Mode = FormMode.Edit,
   Parent.Default) 


 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User II
Super User II

Hi @KHenderson 

While I'm not quite sure of what you are doing, but I would use Set({var, xxx}) to create a global variable in your popup depending on whether something is entered into the TextInput control in question when the popup is closed.  Assuming that the Default property of the TextInput control reflects the Parent.Default of the Item in question.   If the Parent.Default of that control is not changed then var will = Parent.Default.  Then use var in the Update property of the data card as in If(var <> Parent.Default ,var, Parent.Default).  I would set the Display Mode property of the card to View so that the user couldn't change it.  

Community Support
Community Support

Hi @KHenderson ,

Could you describe more clearly about

1) what is the  popup  used for? when will it display?

I do not quite understand " a popup (Mini request) sections is filled out".

2)whether do you want the datacard's Default display based on different conditions or Update with different value?

I do not quite understand " I need an if statement or update that has default text if new but if a section is updated in the popup then Updated text. "

3)where do you put these formulas?

If(EditForm1.Mode = FormMode.New, "N/A",Parent.Default)
 Concat(Requestgal, RequestItems, " ,")
4)what does these two represents? "Requestgal","RequestItems"?
 
I suggest you describe more clearly about the feather that you want. Showing more picture will be better.
For now, I could not find the relationship between the two formulas that you provided.
 
 
Best regards,
 
Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,  

Thank you for looking at this. I am sorry for the lack of clarity. I hope my response and pic help out a little. Forgive my skills drawings the mouse is difficult to use.

 

1.what is the  popup  used for? when will it display? I do not quite understand " a popup (Mini request) sections is filled out". 

The popup(mini request) is displayed when the form input data card is pressed(on select)

It opens a couple of popups with tab selections and toggles that are used to make a survey request. The request is submitted to another SP list and app for processing.  

2.whether do you want the data card's Default display based on different conditions or Update with different value? 

I do not quite understand " I need an if statement or update that has default text if new but if a section is updated in the popup then Updated text. " 

 I need the form data card to show a default of "N/A" , if they filled out the popup request it needs to show that requested data (Concat(Requestgal, RequestItems, " ,") or if in edit mode then the last selected. 

 

3)where do you put these formulas? 

If(EditForm1.Mode = FormMode.New, "N/A",Parent.Default) 

 Concat(Requestgal, RequestItems, " ,") 

 

Form datacardvalue (text) ,  Default:   If(EditForm1.Mode = FormMode.New, "N/A",Parent.Default)      *This is the field that I need help updating with Concat(RequestgalRequestItems" ,") which is the data from the popup selections. 

 

4)what does these two represents? "Requestgal","RequestItems"? 

They represent the popup selections (survey request) 

Hi @KHenderson ,

Do you want to display default value of the textinput in these three situations:

1)form mode is new and not fill out the pop-up window : "N/A"

2)form mode is new and  fill out the pop-up window : Concat(Requestgal, RequestItems, " ,")

3)form mode is edit: Parent.Default

If so, I suggest you use a variable to justify whether you fill out the pop-up window.

Try this:
set the screen's OnVisible:

Set(fillout,false)

set the tabs and toggles inside the pop-up  OnSelect:

Set(fillout,true)

set the textinput's Default:

If(!fillout&&EditForm1.Mode = FormMode.New, 
   "N/A",
   fillout&&EditForm1.Mode = FormMode.New, 
   Concat(Requestgal, RequestItems, " ,") ,
   EditForm1.Mode = FormMode.Edit,
   Parent.Default) 


 

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (43,835)