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

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
Dual Super User
Dual Super User

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

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
Dual Super User
Dual Super User

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

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

octaking
Level: Powered On

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

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

 

 

 

 

 

 

Dual Super User
Dual Super User

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

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

octaking
Level: Powered On

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

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
Level: Powered On

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

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
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: 331 members 5,967 guests
Please welcome our newest community members: