cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Power Apps
Power Apps

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,728)