Read PowerApps toggle control value - demo

Read PowerApps toggle control value

No comments

 881 total views,  5 views today

In this PowerApps Tutorial, we will learn how to read PowerApps toggle control value and what is PowerApps toggle control in PowerApps.

What is PowerApps Toggle control?

Toggle control is a switch control that the user can turn on or off by moving its handle – this returns either true or false based on the switch selection.

Key properties of PowerApps Toggle control

Below are the key properties of PowerApps Toggle control:

  • Default – This is the default value of the control before it is changed by the user.
  • Value – This is the value of input control.

PowerApps Toggle control – demo

In the below screen, the PowerApps toggle control is being shown, when the user enables it, this returns true or when the user disables this it returns false.

PowerApps Toggle control - demo
PowerApps Toggle control – demo

When a user disables the toggle control, it returns false.

PowerApps toggle control enabled or disabled switch
PowerApps toggle control enabled or disabled switch.

Now let’s learn how does it work technically.

Add a toggle control and a label control to display the result.

Select the label control where you want to display the toggle control selection result.

Select the “Text” property of the label control.

Inside the Fx formula box, write the below condition:

If(Toggle2.Value = true,
true,
false
)

PowerApps toggle control enabled or disabled formula

PowerApps toggle control enabled or disabled formula

Description:

In the above demo, “Toggle2” is the toggle control name, inside the if condition we are checking, if the toggle control selected value is true, then return true otherwise false.

Summary

Thus, in this article, we have learned about PowerApps toggle control and how to read the value of toggle control conditionally in PowerApps.

See Also

You may also like the below PowerApps articles:

Buy the premium version of SharePoint Online & Office 365 administration eBook from here:


Buy SharePoint Online & Office 365 Administration eBook