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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / put gallery item in a ...
Power Apps
Answered

put gallery item in a label based on the bottom clicked

(0) ShareShare
ReportReport
Posted on by

hello everybody, 

I have a screen like a poduimp3.PNG

 clicking on win 1 or win 2 or win 3 buttoms takes to a screen that have gallery of items gell.PNG

 when the user clicks in the thumbs up button, the selected items title is put in label above the win 1 oe 2 or 3 buttom depending on the selected buttom. 

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    On Click on thumbs up icon, you can set a variable => Set(varWinner1, Gallery1.Select.Title). If you have 3 galleries, you will have to add 3 variables.
    On the label1 text property you can put - If(IsBlank(varWinner1), xxxxxx, varWinner1)

  • Community Power Platform Member Profile Picture
    on at

    thank you for your reponse @NandiniBhagya20 

    but the problem that I have 3 buttoms, and which label to fill depends on what button I clicked.For instance when I click on WIN 1 and I choose which item to put in the label, the title should be put in the label above win 1 , however if I click on WIN 2 and I choose one of the items from the gallery to put in the labem, the title should be put the label above WIN 2 , did u understand what I mean ?

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Are you having 3 different galleries or you are using one gallery

  • Community Power Platform Member Profile Picture
    on at

    I am using 3 bottuns for one gallery

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Are you having a field in the backend which we can use to differentiate between WIn1, WIN2 and WIN3

  • Community Power Platform Member Profile Picture
    on at

    Except the name of the buttons, I have nothing 😅

  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Okay, so we will have a variable that will do this work. On Click on WIN 1 button add below formula - 
    Set(varButtonWIN, "WIN 1")
    Similarly on click on WIN 2 button add below formula -
    Set(varButtonWIN, "WIN 2") and for WIN 3 button add below formula-
    Set(varButtonWIN, "WIN 3")
    In the gallery on click of thumbs up icon we will check, 
    Switch(varButtonWIN, "WIN 1", Set(varWINText1, ThisItem.Title); Set(varWINText2, Blank()); Set(varWINText3, Blank()), "WIN 2", Set(varWINText1,Blank()); Set(varWINText2,ThisItem.Title); Set(varWINText3, Blank()), 

    "WIN 3", Set(varWINText1,Blank()); Set(varWINText2, Blank()); Set(varWINText3,ThisItem.Title) )

    Set text value of 3 labels to varWINText1, varWINText2, varWINText3 respectively 

  • Community Power Platform Member Profile Picture
    on at

    @NandiniBhagya20 

    it worked like heaven, thank you so 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard