Overview
In this tutorial, we will review how fields can be disabled based on user entering data in a drop down, toggle, date picker, numeric text input and regular text input.
YouTube
Drop Down
Dataverse Option Set
If you’re using a Dataverse option set in your dropdown, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, compare the selected value of the drop down to the Dataverse option set value
Note – It may be tricky to find the correct Option set value from Dataverse. If this is the case, copy it from the Items property of the dropdown
If(dropdown_Status_DV.Selected.Value = 'Account Status Optionset'.Cancelled, DisplayMode.Edit, DisplayMode.Disabled)

Local Collection Option Set
If you’re using a local collection for your drop down options, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, compare text value of the local collection
If(dropdown_Status_LC.Selected.Description = "Cancelled", DisplayMode.Edit, DisplayMode.Disabled)

Toggle
If you’re comparing against a Toggle to disable controls in your app, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, the If condition will only need the true or false value of the toggle to disable ex) toggle.Value = true or !toggle.Value = false
If(tgl_Status.Value, DisplayMode.Disabled, DisplayMode.Edit)

Date Picker
If you’re comparing against a Date Picker to disable controls in your app, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, you can compare against a date range if you wish ex) date prior to today is selected
If(date_Selection.SelectedDate < Today(), DisplayMode.Edit, DisplayMode.Disabled)

Numeric Text Input
If you’re comparing against a text input that only accepts numeric values, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, you can compare against a numeric range ex) numeric value is above a certain amount
If(Value(text_Number_Input.Text) > 10, DisplayMode.Edit, DisplayMode.Disabled)

Standard Text Input
If you’re comparing against a standard text input, you will need to perform the following:
- Select the control you want to disable
- Select the DisplayMode property
- In the formula window, you can compare against a text value
If(text_Input.Text = "Cancelled", DisplayMode.Edit, DisplayMode.Disabled)

