cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KHenderson
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
Drrickryp
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.  

v-yutliu-msft
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (36,440)