cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

override IF statement with an ONSELECT function?

I have a text entry box that will only show up when specific IF conditions are met.

 

What I need is for the user to then close the box down using the a ONSELECT function for an icon with out the required conditions being changed. 

 

The IF statement sits in the (visible) section so i cant seem to rename it and do do it that way which i know already works. 

Please see what I have done so far:

If(RandomLetter1MS.Text = "F", true, false) Or If(RandomLetter2MS.Text = "F", true, false) Or If(RandomLetter3MS.Text = "F", true, false) Or If(AreaFConfirm.Icon ="OnSelect", true)

The last If(AreaFConfirm.Icon="Onselect",true) didn't work when I selected the Icon. Everything else is fine. Any help would be much appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Courtney ,

Could you please share a bit more about your scenario?

Do you only want to display the Text Box when the "F" text is entered in RandomLetter1MS or RandomLetter2MS or RandomLetter3MS?

 

Based on the needs that you mentioned, I think there is somethong wrong with your formula. I have made a test on my side, please consider take a try with the following workaround:

Set the OnVisible property of current screen to following:

Set(CloseClick, false)

Set the OnSelect property of the Icon to following:

Set(CloseClick, true)

Set the Visible property of the Text Box to following:

If(
   (RandomLetter1MS.Text = "F" || RandomLetter2MS.Text = "F" || RandomLetter3MS.Text = "F") && CloseClick = false,
   true,
   false
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

5 REPLIES 5
Super User
Super User

On the icon's OnSelect property, add this formula

 

Set(Override, true)

 

 

Then you can use this logic in your Visible property. No need for an if statement if you're going to return true in a true case.

 

RandomLetter1MS.Text = "F" || RandomLetter2MS.Text = "F" || RandomLetter3MS.Text = "F" || Override

 

 

 

 

Thanks for getting back to me, I tried but it still doesn't seem to be working. The formula is accepted but when the random letter returns anything other than F the text entry box remains. The on select formula is accepted but makes no change either. Perhaps i'm missing something. 

Community Support
Community Support

Hi @Courtney ,

Could you please share a bit more about your scenario?

Do you only want to display the Text Box when the "F" text is entered in RandomLetter1MS or RandomLetter2MS or RandomLetter3MS?

 

Based on the needs that you mentioned, I think there is somethong wrong with your formula. I have made a test on my side, please consider take a try with the following workaround:

Set the OnVisible property of current screen to following:

Set(CloseClick, false)

Set the OnSelect property of the Icon to following:

Set(CloseClick, true)

Set the Visible property of the Text Box to following:

If(
   (RandomLetter1MS.Text = "F" || RandomLetter2MS.Text = "F" || RandomLetter3MS.Text = "F") && CloseClick = false,
   true,
   false
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Perfect, thank you! 

@Courtney ,

Have you solved your problem?

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (53,634)