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

Conditional Formatting issue - Give green color to icon when Valua A is grather then ValueB???

Hi, 

 

I am trying to create a powerapp and would like the "check" icon to be desplayed as Green when DataCard16 is grather then DataCard15. The DataCards are desplayed in another screen and the date comes from a sharepoint list.

 

I have tried to use the roles function in powerapps with these conditions: "Value(DataCard16.Default)>Value(DataCard15.Default)". And the action is off cource giving the "Check Sign" a green light.

 

However, This is my issue:

I get the grean light, but only when I click on the "Check Sign". Once I click on the "Check Sign", I do not only get the green light on the fields in the browsgallery, but I get it on every single field:

Screen Shot 2018-06-05 at 12.20.46.png

 

What I would like to see, is that every contact/Fileld in the browsgallery (Aske Store, Bitten, Boutique, etc) show a green light on the "Chech Icon" and a red light one the "X", when "(Value(DataCard16.Default)>Value(DataCard15.Default) vice versa.

 

Any ideas of how I might do this? 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Conditional Formatting issue - Give green color to icon when Valua A is grather then ValueB???

When you reference a control outside the gallery within an element in a gallery, it has a single value associated with it - the "current" value of the control's Default property in your case. That's why all elements of the gallery (the checkboxes) will have the same color.

 

You can use the members of the ThisItem operator to compare the values for each row in the gallery, and with that you should have a per-row change in the color of the check icon.

 

For example, if the value of the Default property of DataCard15 is set to 'ThisItem.OriginalPrice' and the Default property of DataCard16 is set to 'ThisItem.NewPrice', you can set the following expression to the Color property of the icon:

If(
    ThisItem.NewPrice > ThisItem.OriginalPrice,
    Color.Green,
    RGBA(101,128,187,1))

View solution in original post

1 REPLY 1
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Conditional Formatting issue - Give green color to icon when Valua A is grather then ValueB???

When you reference a control outside the gallery within an element in a gallery, it has a single value associated with it - the "current" value of the control's Default property in your case. That's why all elements of the gallery (the checkboxes) will have the same color.

 

You can use the members of the ThisItem operator to compare the values for each row in the gallery, and with that you should have a per-row change in the color of the check icon.

 

For example, if the value of the Default property of DataCard15 is set to 'ThisItem.OriginalPrice' and the Default property of DataCard16 is set to 'ThisItem.NewPrice', you can set the following expression to the Color property of the icon:

If(
    ThisItem.NewPrice > ThisItem.OriginalPrice,
    Color.Green,
    RGBA(101,128,187,1))

View solution in original post

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
Users Online
Currently online: 255 members 6,221 guests
Please welcome our newest community members: