HI,
I am trying to get all the red toggles/data cards within this form to go disabled when i switch the machine in use one to no.
All help appreciated!
Hi @Rogan ,
I think your column is of type Boolean in SharePoint. Please use the formula as below. I think there is a type mismatch error.(Incompatible types for Comparison Error).
My toggle Control Name is DataCardvalue5 , use your toggle control Name instead in the below formula.
If(DataCardValue5.Value=true,DisplayMode.Edit,DisplayMode.Disabled)
Below images are for your reference.
Please give this a thumbs up if this helps and accept this as a solution.
Thanks,
ok i Wrote that formula but now i have the yellow triangle error and it is constantly disabled?
Hi @Rogan ,
Please search for the field based on which you want to disable other fields from the left side (In Tree View and Get the DataCardValue controlname) and then write this formla.
Thanks,
These are the options i get after i type if.
which do i want? Neither seem to like it when i put .Value after them.
Hi @Rogan ,
Select the Data card or DataCardValue from the left pane , which you want to disable and write the formula in the DisplayMode property of the control.
Lets say you want to disable a field based on MachineStatus column , then use the below formula,
If(MachineStatus.Selected.Value="On",DisplayMode.Edit,DisplayMode.Disabled)
Please use DataCardValue property from the DataCard while you are disabling the field.
If this helps please give it a thumbs up and accept it as a solution.
Thanks,
To disable fields based on the value of another field in a canvas app form, you can use the following steps:
Identify the field whose value will determine the disabling/enabling of other fields. Let's call this field "MachineInUse".
For each field that you want to disable when "MachineInUse" is set to "No", follow these steps:
a. Select the field you want to disable.
b. In the properties pane, look for the "Visible" or "Enabled" property, depending on the type of control you are using.
c. Click on the property and switch its value to the following formula:
If(MachineInUse.Value = "No", false, true)​
This formula checks if the value of the "MachineInUse" field is "No". If it is, the formula returns false, which disables the field. If it's any other value, the formula returns true, enabling the field.
d. Repeat these steps for each field you want to disable.
Save your changes and test the form. Now, when the "MachineInUse" field is set to "No", the other fields should be disabled, and when it's set to any other value, the fields should be enabled.
Note: The exact steps may vary depending on the canvas app development platform you are using, but the concept of using a formula to conditionally disable fields remains the same.
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional