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

Disable field if another field consist of certain words

Hi,

 

I want to disable a toggle box (Yes/No) if another text field consists of either ONS or OFF.

 

Does anyone know how to do this?

 

Help much appreciated 🙂

 

Regards,

Trond

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Disable field if another field consist of certain words

Hi @TroGun18 

 

In tht case, you can modify the displaymode property of the toggle control as:
 
If ("ONS" in TextInput1.Text || "OFF" in TextInput1.Text, DisplayMode.Disabled, DisplayMode.Edit)
 
Here, TextInput1.Text needs to be replaced with the control/field which you need to validate.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User
Dual Super User

Re: Disable field if another field consist of certain words

Hi @TroGun18 

 

In tht case, you can modify the displaymode property of the toggle control as:
 
If ("ONS" in TextInput1.Text || "OFF" in TextInput1.Text, DisplayMode.Disabled, DisplayMode.Edit)
 
Here, TextInput1.Text needs to be replaced with the control/field which you need to validate.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Highlighted
Helper III
Helper III

Re: Disable field if another field consist of certain words

Brilliant @yashag2255 

That works PERFECTLY and was just what I needed.

 

Thanks a lot 🙂

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,269)