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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Selecting Gallery info containing containers

(0) ShareShare
ReportReport
Posted on by 423

I have an issue where I have created a gallery where I have a horizontal container showcasing the information as different labels. 

The OnSelect property of each label is EditForm(Form1) then I have my form which has the Item property set to Gallery1.Selected.

 

I am getting an error. Gallery Selected issue.jpg

 

If I create a gallery without the containers and this works fine. What am I missing ??

 

Categories:
I have the same question (1)
  • AhmedSalih Profile Picture
    6,678 Moderator on at
    Re: Selecting Gallery info containing containers

    Hello, @nshaw75, the Datasource schema that you are using in the Items property of the Gallery has to be the same schema that you are using in the DataSource property of the Form control.

     


     

    If my reply helped you, please give a 👍 If it solved your issue, please give a 👍 & accept it as the Solution to help other community members find it more.

    Visit my Blog: ahmedsalih.blog

    Visit my YouTube Channel: https://www.youtube.com/@powerplatformplace/videos

     

     

  • Verified answer
    WarrenBelz Profile Picture
    151,875 Most Valuable Professional on at
    Re: Selecting Gallery info containing containers

    Hi @nshaw75 ,

    An alternative structure here that will address this and also have many other benefits
    OnSelect of your Gallery

    Set(
     gblRecord,
     LookUp(
     SPListName,
     ID = ThisItem.ID
     )
    )

    This allows for your gallery to have removed/added fields to your list.

    Item of your Form

    LookUp(
     SPList,
     ID = gblRecord.ID
    )

    OnSuccess of your Form

    Set(
     gblRecord,
     Self.LastSubmit
    )

    Apart from solving your current issue, you will find that any controls based directly on the SP List will refresh automatically and you can refer to any field in the current record with simply

    gblRecord.YourFieldName

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • nshaw75 Profile Picture
    423 on at
    Re: Selecting Gallery info containing containers

    Thanks Warren, I have been playing around with it today and finally seem to be getting somewhere. I just don't understand why it has been working in all my other apps, yet on this one it doesn't seem to want to follow suit 

  • WarrenBelz Profile Picture
    151,875 Most Valuable Professional on at
    Re: Selecting Gallery info containing containers

    Hi @nshaw75 ,

    You will find that taking a bit of time for a small amount of code to make specific references will do a lot to “future proof” your app.

  • nshaw75 Profile Picture
    423 on at
    Re: Selecting Gallery info containing containers

    Many thanks, I am going to pick this up again this morning to see how it all fits in nad hopefully can get the entire app running. I am trying to set up a standard template so fingers crossed if I can nail it on this one all the future ones will be the same. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 714 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 419 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard