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 / 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 Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard