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 / Powerapp Gallery Buttons
Power Apps
Unanswered

Powerapp Gallery Buttons

(0) ShareShare
ReportReport
Posted on by 209

Hello,

I have a gallery on my powerapp with buttons on each gallery entry.  When I press any of the buttons it affects the whole gallery and not just the entry I want to update.  How can I set the buttons so that they only action / update the gallery entry I choose ?

Thanks,

Mick

Categories:
I have the same question (0)
  • FazalUrrehman Profile Picture
    131 on at

    @Station1901 Can u provide with the code u have tried so that i can help u better ??

     

  • v-mengmli-msft Profile Picture
    on at

    Hi @Station1901 ,

     

    Could you please show me the formula on the button and what kind of functionality do you want to achieve when you click the button?

    If you want to click the button for an item in the gallery to update the current record, you can do so:

    OnSelect:
    Patch(TableName,ThisItem,{ColumnName:Value})

     

    Best regards

    Rimmon

  • Station1901 Profile Picture
    209 on at

    I have a telephone icon on each of the gallery entries. I want the user to press the icon when they have called a customer and then this will then display the other options for that particular customer but when the user presses the telephone icon ALL of the other options display for ALL of the customers in the gallery.  Is there a way to fix this so that if the telephone icon is pressed the buttons only display for that customer.  The code on the 'On Select' option for the telephone icon is
    'Gallery2.Selected.CID;
    Set(gVar_Contact,"Y")'
    The other buttons display when gVar_Contact is set to Y

  • FazalUrrehman Profile Picture
    131 on at

    @Station1901 What does the column CID holds?? 

    And it wont work with variable though

     

  • FazalUrrehman Profile Picture
    131 on at

    And whats the datasource of the gallery ?/

     

  • Station1901 Profile Picture
    209 on at

    CID is a unique identifier for each record in the Gallery and the datasource is a sharepoint list named Cars.  Whenthe Phone icon is pressed it changes the variable to Y the other buttons on that row have their visible setting to only show when the variable is Y which works but it displays the buttons in every row in the gallery when any phone icon is pressed.  Essentially when the variable is set to Y it sets every button on every entry in the gallery visible property to true

  • Verified answer
    v-mengmli-msft Profile Picture
    on at

    Hi @Station1901 ,

     

    Are the controls that show the customer's other options also in the gallery?

    I'm assuming you're doing this, when the value of the variable is "Y", the visible property of the control in the gallery is true.

    The cause of the problem is that controls are using the same variable.

    The best thing to do is to add columns with values of true/false to the data source for each control Visible property in the gallery, and then, when you click the button, update the current values of those columns to true.

    OnSelect:
    Patch(TableName,ThisItem,{VisibleColumn1:true,VisibleColumn2:true})

     And use ThisItem.VisibleColumn on the visible property of controls.

     

    Best regards,

    Rimmon

  • Station1901 Profile Picture
    209 on at

    This works perfectly - thankyou

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 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard