cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
octaking
Helper V
Helper V

change the color of a label according to the selection of a gallery

How can I change the color of an individual label that is in a gallery and tried but all labels change color since they are the same control

 

Captura de Pantalla 2019-09-05 a la(s) 16.04.23.png

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Dual Super User II
Dual Super User II

Hi @octaking 

 

You will have to write logic (If condition) to change the color for your specific row in the gallery

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
RezaDorrani
Dual Super User II
Dual Super User II

Hi @octaking 

 

You will have to write logic (If condition) to change the color for your specific row in the gallery

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

hi @RezaDorrani 

i tried with this:

If(galOpcionesMisSolicitudes.Selected.Value = "Pendientes"; RGBA(255;255;255;1);                                        galOpcionesMisSolicitudes.Selected.Value = "Aprobadas"; RGBA(76;209;55;1);                              galOpcionesMisSolicitudes.Selected.Value = "Rechazadas"; RGBA(220;20;60;1))

 

but the result is as follows:

 

Captura de Pantalla 2019-09-05 a la(s) 18.08.26.png

 

 

 

 

 

 

Hi @octaking 

 

inside the gallery label color property use

 

Try with ThisItem

If(ThisItem.Col.Value = "Pendientes"; RGBA(255;255;255;1);      

 

ThisItem.Col or ThisItem.Col.Value depending upon your column type

Hi @RezaDorrani Thanks for your time

 

I have tried but now pending is blank , approved is in green and rejected in red without me selecting them

 

Use the following formula and it works, but those that are not selected run out of color

If( galOpcionesMisSolicitudes.Selected.Value = "Pendientes" And lblTituloOpciones.Text = "Pendientes"; RGBA(255;255;255;1); galOpcionesMisSolicitudes.Selected.Value = "Aprobadas" And lblTituloOpciones.Text = "Aprobadas"; RGBA(76;209;55;1); galOpcionesMisSolicitudes.Selected.Value = "Rechazadas" And lblTituloOpciones.Text = "Rechazadas"; RGBA(220;20;60;1) )

 

 

look at the following image select Approved but the others run out of color should be white

 

Captura de Pantalla 2019-09-05 a la(s) 18.51.21.png

octaking
Helper V
Helper V

It worked as follows

 

Captura de Pantalla 2019-09-05 a la(s) 21.47.04.png

 

the result is in the attachment below

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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 (2,148)