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 / How do you connect gal...
Power Apps
Unanswered

How do you connect gallery items to their specific datacards when a gallery item is selected

(0) ShareShare
ReportReport
Posted on by 21

I am trying to design a "sign-off" page where the user clicks on a clearance sheet (shown in the gallery on the lefthand side of the screen), which then displays the corresponding sign off page (shown as a datacard on the right), where the user will click the sign off buttons to say that something has been done for that sheet. Since there are multiple different sheets, how do I use code to connect each new sheet created with their corresponding sign off page?

Someone told me try updatecontext or patch but I'm very new to power apps and don't know how to code it. If someone knows how to do this can you please explain step by step what lines of code to do?

For each new sheet created in the gallery, a fresh sign off page should come up so that the user can start the sign off process again. 

 

Any help appreciated 🙂 

Annotation 2024-01-26 123058.png
Categories:
I have the same question (0)
  • Samuel-Zhou Profile Picture
    393 on at

    @shreya_b Hi,

    First, you need to create a variable in the onstart attribute of the arrow on the left gallery, such as

     

    Updatecontext:({test:Thisitem})

     

    Or

     

    Set(test,Thisitem)

     

    Next, you set the items attribute of the gallery on the right to test to complete the link. The premise is that there is a Gallery on the left and there is data first.

  • shreya_b Profile Picture
    21 on at

    Hi @Samuel-Zhou ,

    Thanks for the fast reply!

    I'm still slightly confused. This is my first time coding a power app so gonna have to take it real slow, I tried the updatecontext function but its coming up with an error. I have attached a screenshot of my page with the error. Pls could u have a look and get back to me 🙂 

    The gallery is connected to a sharepoint list not sure if that has anything to do with it

    Annotation 2024-01-26 133246.png
  • Samuel-Zhou Profile Picture
    393 on at

    @shreya_bWhat is the error message? and code should be

    UpdateContext({test:Thisitem})

    The T in ThisItem is capitalized

  • shreya_b Profile Picture
    21 on at

    My bad, theres no error now.

    The right hand side scrolling section with the sign off buttons is a datacard not a gallery, is there still a way to connect this to the gallery with updatecontext arrow button?

    If so what is the code I would use 

     

    Thank u!

     

     

  • Samuel-Zhou Profile Picture
    393 on at

    @shreya_bIs datacard a form? If so, you can set test in the item of the form, and the data source can be set to the same data source as the gallery.

  • shreya_b Profile Picture
    21 on at

    Nah its not a form, just a canvas datacard with a bunch of rectangles with text in it and the "sign-off" buttons which arent coded yet. I made it a datacard so I can have the scrolling effect because theres 20+ buttons that needed to be clicked by users. Is there another way i can do this ?

  • Samuel-Zhou Profile Picture
    393 on at

    Could you please provide the properties of the data card?

  • shreya_b Profile Picture
    21 on at

    Attached a screenshot for u 

    Annotation 2024-01-26 141333.png
  • Samuel-Zhou Profile Picture
    393 on at

    Please check the advance again, it is on the right side of the properties.

  • shreya_b Profile Picture
    21 on at

    Ive attached what I'm seeing in the advance section.

     

    Annotation 2024-01-26 142352.png
    Annotation 2024-01-26 142501.png

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard