cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Alphahorse
Regular Visitor

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
Power Apps
Power Apps

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
Power Apps
Power Apps

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (6,107)