cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TroGun18
Level: Powered On

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
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
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

TroGun18
Level: Powered On

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,186)