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 / Gallery and Form data
Power Apps
Unanswered

Gallery and Form data

(0) ShareShare
ReportReport
Posted on by 433

I have set up a form to show detail for gallery rows.  The Form and the Gallery are pointing to the same data source, but the Gallery is using a filter.  I don't see a way to tell the Form to specifically look at the selected row in the Gallery.  Maybe that is implicit.

 

In the Form, I am combining some fields and using conditional logic for labels based on the fields.  Examples:

  • Concatenating a code and description, both of which are in the record:  MyCd & "-" & MyDesc
  • Showing a label if the field has data:  If(IsBlank(MyFld),"","Field label")

These both work, when data loads.

 

I thought that the Gallery row and the Form would have access to all the fields for current source row.  I have found, though, that some fields in ThisItem are not populated when the Form tries to access them.  If I put that field into the gallery, the gallery reloads (which is puzzling) and the value is then available in the Form.

 

What am I missing?  Maybe it's because I'm having my Form card reference more than one field?  How should I do that, then?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @akharns 

    Check out the item property of the form. Put in Lookup(your datasource,ID= yourgalleryname.Selected.ID) and stop messing with the cards in the form.

  • akharns Profile Picture
    433 on at
    • The Form Item property says 'SiteList gallery'.Selected.  That sounds correct to me.
    • Why does the gallery reload when I add a data element to it?  That data element should have already been in the source record which is loaded, even if it's not referenced in the gallery, right?  This could very well point to the root of my problem.
    • You're proposing that the form do a separate read (i.e. lookup) of the source data, and not try to use the source data that was loaded in the gallery?  I can imagine that this would solve the problem.  The answer to the previous question will help me understand if this is needed.  It will add some overhead, I think.
    • As for your comment about the cards, I haven't used forms without cards yet.  I think the cards will be useful in saving screen space when listing fields without values.
  • akharns Profile Picture
    433 on at

    I changed the Form's data source to LookUp(vw274Site,k04_SD_ID='SiteList gallery'.Selected.k04_SD_ID).  The form is now performing strangely.  It shows data but it also has a floating "connect to data" prompt.

     

    Also, is delegation going to make it necessary for me to specify all the expected columns?  We need the vast majority of them in this form.  I think I'm seeing that some column data is not returning.  I thought maybe lookup would get us past that but maybe not.

  • akharns Profile Picture
    433 on at

    Here's an abstract of what I have in my Form's DataSource Property:

    First(
    ShowColumns(
    Filter(MyDatasource,KeyField='MyGallery'.Selected.KeyField),
    "KeyField",
    "Field2",
    "Field3"
    ))

     

    This is to supplement the previous question I posted, of getting a prompt for a data source while also showing data.  I have now added all the columns.  The behavior existed before using ShowColumns.  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @akharns 

    What data source are you using?

  • akharns Profile Picture
    433 on at

    SQL

  • akharns Profile Picture
    433 on at

    I think I found the problem (not the solution yet).  I did a specific Lookup for the data source.  I don't know what needs to be specified in the Item property.  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @akharns 

    I believe you can use the ID field in your Item property as I first answered.

  • akharns Profile Picture
    433 on at

    As I understand it, ShowColumns is intended to reduce the number of columns returned, i.e. to return a small number of columns.  Does it work even if I have a good number of columns but far less than the whole list?  Or does the large specification create more unwanted overhead?

  • akharns Profile Picture
    433 on at

    Sorry, @Drrickryp , I don't understand.  Did you read my post above starting with "Here's an abstract..."?  What I'm calling KeyField is what you're calling ID, I think.  I'm still unclear on what should be the content of DataSource as opposed to Item for the Form.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard