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 / Get item from a galler...
Power Apps
Answered

Get item from a gallery (source : collection)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have data in a collection

I show it in a gallery and I tell the user to select an item

But when I want to display fields of the selected item in an other screen I have an error

I store the selected item into a variable (varSelected) I can get the "name" value with varSelected.Name but not the other fields (region, function...)

pow1.pngpow2.png

For example the message error for the formula varSelected.Region is "Name isn't valid. The identifier isn't recognized" for the .Region whereas I have a Region column in my collection as you can see in the first screen ...

Thanks in advance !

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

    Hi @Anonymous 

    You can also do lookup on the form Item property example Lookup(dataSource,ID,=varSelected.ID) it will do what you wanted

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, Thanks for your answer

     

    I find a solution I use the gallery property

    pow1.png

    🙂

  • dgatewood Profile Picture
    34 on at

    If you still wanted to do the variable approach on your next button you could do  UpdateContext({varSelected: GalleryName.Selected}) if you aren't using a whole new Screen. Using a direct gallery.selected properties means it will auto populate the first record if nothing is selected. Variable approach also means you can disable the user from moving forward if varSelected is empty meaning they selected nothing. Just a thought from past experiences

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard