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

 

 

 

 

Highlighted

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. 

Highlighted
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

Highlighted

Perfect, thank you! 

Highlighted

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,446)