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

IF - Multiple lines by true or false

Is it possible to use the IF and set more than one sentence either by true or false?

 

For example, I need to disable an option and also show a Notify message (like "Access Denied").

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Yes, it can be done.  The following line will set a variable to a value and do a notification if a TxtInput1 control contains "test". The key is to put command separators after the statements in the true or false section.

If(TextInput1.Text="test",Set(vartest,"test");Notify("The test was successful");,Set(vartest,""))

  You can then disable the option based on the value of the variable. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Pstork1
Dual Super User III
Dual Super User III

Yes, it can be done.  The following line will set a variable to a value and do a notification if a TxtInput1 control contains "test". The key is to put command separators after the statements in the true or false section.

If(TextInput1.Text="test",Set(vartest,"test");Notify("The test was successful");,Set(vartest,""))

  You can then disable the option based on the value of the variable. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,046)