top of page

PowerApps Toggle Yes/No

The PowerApps Toggle control functions similarly to a checkbox, allowing users to turn it on or off using its handle. The Toggle control in PowerApps is essentially a switch control. By utilizing this control, users can easily toggle the switch on or off by interacting with its handle.


The Toggle control in PowerApps provides a visual representation of a binary state, where it can be in either an "on" or "off" position. When the Toggle control is in the "on" position, it signifies that a particular setting, feature, or action is enabled. Conversely, when the Toggle control is in the "off" position, it indicates that the setting, feature, or action is disabled.


To use the Toggle control in PowerApps, you can simply add it to your app's user interface. Users can interact with the control by clicking or tapping on its handle, which is the small circular knob typically positioned on the switch. Clicking or tapping the handle will toggle the state of the control between "on" and "off".


In this article, we will guide you on how to add PowerApps Toggle and how to control it.


How to add Toggle to your PowerApps

Follow the below steps to add a toggle to your PowerApps screen:


STEP 1: Open the PowerApps form and go to the "Insert" tab.


STEP 2: Now, click on "Input" and select "Toggle". This will add the toggle switch control to your PowerApps screen.

PowerApps Toggle (1)

STEP 3: You can also add label input control. For that go to Insert => Label.


STEP 4: Now, you have to set the condition formula in the label control to display the specific value.


STEP 5: If you want to rename the Toggle switch, click on "More Options (...) and select "rename".

PowerApps Toggle (2)

STEP 6: Here, I have renamed it as "PowerApps Discount".


STEP 7: Apply the following formula to the text property of the label control.

Text = If('Powerapps Course Discount'.Value = true, "Price: $100", "Price: $500")

In the above condition, when you will switch on the toggle the price will be $100 and when switch off the toggle the price will be $500.

PowerApps Toggle (3)

Output:

PowerApps Toggle (4)

Here we have another example.

Text = If('PowerApps Discount'.Value = true, "Toggle is ON", "Toggle is OFF")

In the above condition, when you will switch on the toggle, it will show "Toggle is ON" and when you will switch off the toggle, it will show "Toggle is OFF."


PowerApps Toggle (5)

Output:

PowerApps Toggle (6)


STEP 8: Save and publish your PowerApps App.


STEP 9: You can preview the app by pressing the F5 button.


PowerApps toggle control Properties

Here are the important properties of the PowerApps Toggle which provide control over the appearance and behavior of the PowerApps Toggle, allowing customization and defining how the app responds to user interactions and changes in the toggle's state.:

  1. BorderColor: Specifies the color of the control's border.

  2. DisplayMode: Determines whether the control is in Edit mode, View mode, or Disabled mode.

  3. DisabledBorderColor: If the control's DisplayMode property is set to Disabled, this property defines the color of the control's border.

  4. FalseFill: Sets the color of the toggle when it is in the "off" position.

  5. FalseHoverFill: Defines the color of the toggle when it is being hovered over and in the "off" position.

  6. FalseText: Specifies the text value to be displayed when the toggle switch is in the "off" position.

  7. Fill: Determines the background color of the toggle control.

  8. HandleFill: Sets the color of the toggle handle.

  9. OnChange: Specifies the app's response when the user changes the value of the control.

  10. OnCheck: Defines the app's response when the toggle value changes to true (when the toggle is turned on).

  11. OnSelect: Specifies how the app responds when the user interacts with the control (e.g., clicks or taps on it).

  12. OnUncheck: Defines the app's response when the toggle value changes to false (when the toggle is turned off).

  13. Reset: Allows the control to revert to its default value.

  14. TrueFill: Sets the color of the toggle when it is in the "on" position.

  15. TrueHoverFill: Defines the color of the toggle when it is being hovered over and in the "on" position.

  16. TrueText: Specifies the text value to be displayed when the toggle switch is in the "on" position.

  17. Visible: Determines whether the toggle switch control is displayed or hidden.


Conclusion

The "PowerApps Toggle" control is a versatile tool that allows users to toggle between a "Yes" or "No" state within a PowerApps application. It provides a user-friendly way to capture and display binary data or boolean values.


The PowerApps Toggle control is typically used in scenarios where you need to present a binary choice or switch-like functionality. It can be utilized in various applications, such as forms, surveys, data entry screens, or any situation where a simple yes or no input is required.


0 comments
bottom of page