web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / MAKING SOME ACTION ACC...
Power Apps
Answered

MAKING SOME ACTION ACCORD TO AN ITEM IN A GALLERY WITH A BUTTON (ON SELECT) AND THE COLOR VALUE

(0) ShareShare
ReportReport
Posted on by 43

Well, i have different galleries that works if the user wants to search some info by for example, status, date, id etc..

I haved this idea about using colors with the galleries items depends of the status.

ACCEPTED GREEN, REJECTED RED -- Something like that

On my filter of only status i did it with the property OnChange and it works perfectly:

 

If (DropEstatus.SelectedText.Value = "ACEPTADA" || DropEstatus.SelectedText.Value = "ACEPTADA PLAZO", Set(colorestatus, "#72D24E"));
If (DropEstatus.SelectedText.Value = "REGISTRADA", Set(colorestatus,"#D7A406"));
If (DropEstatus.SelectedText.Value = "RECHAZADA", Set(colorestatus,"#CA614C"));

 

28GREKA_1-1664553323723.png

 

28GREKA_0-1664553309055.png

So in my two labels, that are inside my gallery i put the valiable of the color in their Color property like this:

 

28GREKA_2-1664553458094.png

 

So.. when i want to do the same when the user wants to find a solicitude by ID it didn't work:

 

28GREKA_4-1664557069979.png

For example, in this case it has to be green not yellow... and i tried more options, even with another label outside the gallery and compare but nothing works...

I would appreciate your help.

 

Thank you! 🙂

 

Categories:
  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    Try using Drowdown.selected.value  instead of Drowdown.selectedText.value

  • 28GREKA Profile Picture
    43 on at

    Hi! Actually that was a mistake, because i'm using in this case the label in the condition: so the DropStatus.SelectedText.Value shouldn't be on the pic:

     

    28GREKA_0-1664558484498.png

    So, there is not a dropdown in this case... When i worked with the dropdown it worked perfectly, my problem is with the button and text input and this item inside my gallerie...

     

    Thanks for answer.

     

  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    You haven't closed the highlighted string

    Sorry I guess its zoomed 

    Screenshot 2022-09-30 213813.png
  • 28GREKA Profile Picture
    43 on at

    Yep, its the zoom! 🙂

  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

     

    Switch(LblEstatudID.Text,"ACEPTADA"||"ACEPTAFA PLAZO",Set(colorestatus2,#XXXXXX),"REGISTRADA",Set(.....),"RECHAZADA",Set(..))

     

    Give this a go!

     

    @28GREKA 

    Please Accept as Solution if it solves your question Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/manan-malhotra-vfx/

    Want to support me! Buy me a Cup of Coffee?

  • 28GREKA Profile Picture
    43 on at

    Thank you, technically it works but, in my case, i guess i need some delay or something because, when i make the first trial its okay, but then when i tried another one, it continues with the same color, and doesn´t take the instructions of change or switch:

    28GREKA_0-1664561990503.png

    For example here, it must be green, not red...

    28GREKA_1-1664562043991.png

    Switch(lblEstatusID.Text ="ACEPTADA"||"ACEPTAFA PLAZO",Set(colorestatus2,"#72D24E"),"REGISTRADA",Set (colorestatus2,"#D7A406"), "RECHAZADA", Set(colorestatus2,"#CA614C"));

     

    I make it this way because with only "," at the beginning it marked an error....

    Thanks again! 🙂



  • Manan-Malhotra Profile Picture
    621 Super User 2024 Season 1 on at

    The comma in the beginning is important to follow according to the Switch syntax
    If you got an error with comma, could you share that error?
    We should try to resolve that error

  • Verified answer
    28GREKA Profile Picture
    43 on at

    Hi !! Actually the Switch advice really helped me, it works:

    28GREKA_0-1664562762489.png

    I put the Switch condition inside of the property Color of my label 🙂

     

    Thank you very much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard