PowerApps toggle control + How to use with example

In this PowerApps tutorial, how to use PowerApps toggle control with example. This is also known as PowerApps toggle switch control.

We will also check, change toggle to yes/no in PowerApps as well as how to change powerapps toggle button text.

PowerApps Toggle Control

PowerApps toggle control works the same way as a checkbox. We can use PowerApps Toggle Control to turn on and off using its handle.

Toggle control is a switch in PowerApps. By using this switch control, a user can turn on or turn off the toggle switch by using its handle.

We will see here how to use PowerApps toggle yes/no.

Add Toggle Control to PowerApps Screen

By taking a simple example, I will show you how you can add PowerApps toggle control and how to use it in a PowerApps Screen.

Example:

You can easily add a Toggle control in your Powerapps Edit form. Go to Insert tab -> Input -> Select Toggle control. Then you can see the Toggle switch control will be added in your PowerApps screen/form.

In this example, I will take a Toggle control and one Label input control. What I will do is, I will set a condition formula in the Label control.

Based upon the Toggle switch value as On/Off, the label will display that specific condition value.

In the below screenshot, you can see a toggle control has been added to the Powerapps screen.

powerapps toggle control
Toggle PowerApps control

Just rename the toggle switch to “Powerapps Course Discount“. For renaming the Toggle switch control, click on more () option and then Rename.

Also, you can rename the toggle switch by double-clicking on it.

powerapps toggle change text
powerapps toggle change text

Similarly, add a Label control (Insert -> Label) and apply the below formula on its Text property as:

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

Where,

“Powerapps Course Discount” = Toggle switch Name

This above formula specifies, if the toggle switch (Powerapps Course Discount) is On, then, the Price will be $100 otherwise it will be $500.

add toggle switch in powerapps
powerapps toggle change text

Save and Publish the PowerApps app. Then preview the app by using the F5 button. When you will do the toggle switch value as “On“, then you can see the Price value will be automatically changed to “$100” depending on the condition as shown below.

add toggle switch in power apps

PowerApps toggle control Properties

Below are some important PowerApps toggle control Properties:

  • BorderColor: It provides color to the control’s border.
  • DisplayMode: It allows whether it is in Edit mode, View mode, or in Disable mode.
  • DisabledBorderColor: If the control’s DisplayMode property is Disabled, then it specifies a color to the control’s border.
  • FalseFill: When the Toggle switch control is off, then the toggle fills with color.
  • FalseHoverFill: When the Toggle switch control is off, then the toggle hover fills with color.
  • FalseText: It helps to show the text value when the toggle switch is off.
  • Fill: It provides the background color of a toggle control.
  • HandleFill: It provides the color to the toggle handle.
  • OnChange: When the user changes the value of a control, then it specifies how the app responds.
  • OnCheck: When the toggle value changes to true, then it specifies how the app responds.
  • OnSelect: It specifies how the app responds when the user hits the control.
  • OnUncheck: It specifies how the app responds when the user changes the control value to false.
  • Reset: It helps the control backs to its default value.
  • TrueFill: When the toggle switch is on, then the toggle fills with color.
  • TrueHoverFill: When the toggle switch is on, then the toggle hover fills with color.
  • TrueText: It helps to show the text value when the toggle switch is on.
  • Visible: It specifies whether the toggle switch control is displaying or hidden.

PowerApps change on off to yes/no

Normally when you will add a Toggle switch control in your Powerapps edit form, it shows the text value either as On or Off. But, In some cases, you may require the Toggle text value as Yes or No instead of On or Off.

Let us see PowerApps change toggle to yes/no or PowerApps change toggle to yes/no.

To resolve this issue, Powerapps provides two toggle properties options as “TrueText” and “FalseText“. By using both properties, you can easily convert the Toggle text value like Yes/No, True/False, or On/Off as per your need.

Example:

For example, I have a SharePoint List and it has some Yes/No field columns. Below screenshot represents all the SharePoint Yes/No fields:

powerapps change toggle to yes/no

When I have added all these Yes/No fields in the Powerapps Edit form, then all the toggle text value appears with “On/Off” instead of “Yes/No“. The Powerapps edit form looks like below screenshot:

powerapps change on off to yes/no
powerapps change toggle to yes/no

To convert this Toggle text value from On/Off to Yes/No, you need to do these below things:

Change PowerApps Toggle Text from On to Yes

In the Powerapps edit form, just select any one of your toggle data cards that you want to convert the text value from On to Yes. Apply the below formula on its TrueText property as:

TrueText = "Yes"

By default, the TrueText value was “On”. You can refer to the below screenshot.

powerapps change toggle to yes no
powerapps change toggle to yes no

Change PowerApps Toggle Text from Off to No

Similarly, to convert the text value from Off to No, just select any one of your toggle data cards that you want to change and apply the below formula on its FalseText property as:

FalseText = "No"

By default, the FalseText value was “Off”. You can refer to the below screenshot.

Once it is done, just Save and Publish the Powerapps app.

Power apps Toggle switch

Preview the Powerapps app:

When you will Preview (F5) the app, then you can see all the toggle text values are changed from On/Off to Yes/No as shown below.

powerapps toggle change text
powerapps toggle change text

Also, you may like these below Power Apps Tutorials:

In this tutorial, we learned how to use PowerApps toggle control in PowerApps App. Then we will see how to change PowerApps toggle to yes/no or change on off to yes/no in PowerApps toggle control. Also, we discussed how to change text PowerApps toggle control.

>