cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RoisinConlon78
Level: Powered On

Power Apps Yes/No colour

Hi,

 

I have an app where when I edit a form there is a series of yes/no questions.  For each of the when the yes option is selected the colur of the slider is set. 

Example

Has this job been quoted -No=Grey, Yes=Green

Has this job beed scheduled No=Grey, Yes=Blue

 

On the details screen however the buttons remain grey even though the slider is pointed to yes

 

Can anyone help with what I need to do to make the buttons on the detail screen reflect the colours.  (I have set the colour on the cards on the dispay screen but this hasn't worked)

 

Hope I have explained this clearly

 

Thanks in advance


Roisin

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Power Apps Yes/No colour

The card that is used for Yes/No columns in the display form uses a Toggle control that is disabled; at this moment, the toggle control doesn't have any way to customize its appearance when it's disabled. We're working on a solution to solve this issue, but for now you cannot change the toggle.

 

As a workaround, you can consider "crafting" your own read-only toggle, by using a few of the controls that let you set the color while disabled. For example, after unlocking the card, you can add a button, set its disabled property to true, its Text property to "" (nothing) and set its DisabledFill property to how you want the "fake toggle" background to show. Next, add a pair of Circles (under the Icons in the Insert tab), and set their Visible property to show or hide based on the value of 'Parent.Default' (which is the value of the item bound to the form), and its Fill color whatever you want it to show. Here's a sample of the properties to set:

Button1.Disabled: true
Button1.Text: ""
Button1.DisabledFill: If(Parent.Default, Color.Orange, Color.Gray)
LeftCircle.Visible: Not(Parent.Default)
LeftCircle.Fill: Color.White
RightCircle.Visible: Parent.Default
RightCircle.Fill: Color.White

Just to be clear, this is a workaround for the current behavior; we'll work to improve this functionality to allow a better customization of the Yes/No card in the display form.

View solution in original post

7 REPLIES 7
Community Support Team
Community Support Team

Re: Power Apps Yes/No colour

Hi @RoisinConlon78,

 

On the edit form, will the slider change the color as you edit? What is your detailed configuration on this? Some screenshots might help here.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RoisinConlon78
Level: Powered On

Re: Power Apps Yes/No colour

 

Hi Mona,

 

See screenshots below.

 

First is in the preview where you can see what happens when the slider is set from no to yes.  Second is in the editing area - you can see the value I have set against "valuefill" property to chane the "processed" slider to orange when selected.

 

Lastly is a snap of the details screen - with both sliders set to yes in the edit screen I would like the corresponding colours to be shown here but can't figure out how.

 

 

Hope that helps.

 

Roisin

 

edit preview.png

 

 

edit colour.png

 

 

 

details screen.png

 

 

RoisinConlon78
Level: Powered On

Re: Power Apps Yes/No colour

Hi Leo,

 

Thank you for your reply

Unfortunately I had already reviewed both those articles and a few others but none seem to cover my specific issue hence the question, I may find find that my answer relates to some of these articles however I can't see it yet and need some guidance as I am quick new to this tool.

 

 

Roisin

Community Support Team
Community Support Team

Re: Power Apps Yes/No colour

Hi @RoisinConlon78,

 

I have reproduced this issue. And I will try to report this to the product team. If there is any update later, I will notice you here.

 

Thanks for the information.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Power Apps Yes/No colour

The card that is used for Yes/No columns in the display form uses a Toggle control that is disabled; at this moment, the toggle control doesn't have any way to customize its appearance when it's disabled. We're working on a solution to solve this issue, but for now you cannot change the toggle.

 

As a workaround, you can consider "crafting" your own read-only toggle, by using a few of the controls that let you set the color while disabled. For example, after unlocking the card, you can add a button, set its disabled property to true, its Text property to "" (nothing) and set its DisabledFill property to how you want the "fake toggle" background to show. Next, add a pair of Circles (under the Icons in the Insert tab), and set their Visible property to show or hide based on the value of 'Parent.Default' (which is the value of the item bound to the form), and its Fill color whatever you want it to show. Here's a sample of the properties to set:

Button1.Disabled: true
Button1.Text: ""
Button1.DisabledFill: If(Parent.Default, Color.Orange, Color.Gray)
LeftCircle.Visible: Not(Parent.Default)
LeftCircle.Fill: Color.White
RightCircle.Visible: Parent.Default
RightCircle.Fill: Color.White

Just to be clear, this is a workaround for the current behavior; we'll work to improve this functionality to allow a better customization of the Yes/No card in the display form.

View solution in original post

PowerApps Staff miglisic
PowerApps Staff

Re: Power Apps Yes/No colour

In future, this should be covered by better theming, not necessarily more customization options across the matrix of control properties and state permutations.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,470)