cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vikna
Helper III
Helper III

Change Fill Colour in Gallery

I managed to get assistance on color fill  here : https://powerusers.microsoft.com/t5/Building-Power-Apps/Change-FIll-Colour-Based-on-TextInput/m-p/92....

 

The next this that I need is as below.

 

I would like to know how to use  command to change the fill color of "JML" if

 

the number of HP Elitebook 830 : 

is <10, change to RED

if  < 20 , change to YELLOW

otherwise, its default color

 

AND

 

the number of HP ZBook 15 : 

is <5, change to RED

if < 10 , change to YELLOW

otherwise, its default color

 

vikna_1-1620808064555.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @vikna ,

Does below screenshot point to two records?

v-albai-msft_0-1620810920015.png

Like my below example?

v-albai-msft_1-1620810953967.png

 

If yes, you can try below formula in the Fill Property of JML( this formula based on value in JML, if you want to compare with the value in Total, you need to do some edit to use Value(TextInput_Total.Text)):

 

If(
    Value(TextInput_JML.Text) < 10 && ThisItem.MODEL = "HP Elitebook 830",
    Red,
    If(
        Value(TextInput_JML.Text) < 20 && ThisItem.MODEL = "HP Elitebook 830",
        Yellow,
        If(
            Value(TextInput_JML.Text) < 5 && ThisItem.MODEL = "HP ZBook 15",
            Red,
            If(
                Value(TextInput_JML.Text) < 10 && ThisItem.MODEL = "HP ZBook 15",
                Yellow,
                White
            )
        )
    )
)

 

Best regards,

Allen

View solution in original post

2 REPLIES 2
v-albai-msft
Community Support
Community Support

Hi @vikna ,

Does below screenshot point to two records?

v-albai-msft_0-1620810920015.png

Like my below example?

v-albai-msft_1-1620810953967.png

 

If yes, you can try below formula in the Fill Property of JML( this formula based on value in JML, if you want to compare with the value in Total, you need to do some edit to use Value(TextInput_Total.Text)):

 

If(
    Value(TextInput_JML.Text) < 10 && ThisItem.MODEL = "HP Elitebook 830",
    Red,
    If(
        Value(TextInput_JML.Text) < 20 && ThisItem.MODEL = "HP Elitebook 830",
        Yellow,
        If(
            Value(TextInput_JML.Text) < 5 && ThisItem.MODEL = "HP ZBook 15",
            Red,
            If(
                Value(TextInput_JML.Text) < 10 && ThisItem.MODEL = "HP ZBook 15",
                Yellow,
                White
            )
        )
    )
)

 

Best regards,

Allen

View solution in original post

This worked. Thank you very much!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,750)