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 values for a selec...
Power Apps
Answered

Get values for a selected item in a previous screen

(0) ShareShare
ReportReport
Posted on by 24

I have sharepoint list which contains tickets.  PowerApps has built me an app from that list and I now have a browse screen to view the tickets, and selecting a ticket takes me to a detail screen where more information about that specific ticket is displayed.

 

Now, on the detail screen I can see that PowerApps created a form that contains the ticket detail fields.  And the data context of that form is set as follows:

bh4017_0-1624364772583.png


So I can see that the form data source is set to the associated sharepoint list and the specific item is referenced via the selected item on the browse gallery from the browse screen.

Inside the form there are datacards and these contain the ticket detail items.

 

bh4017_1-1624365076437.png


So here is where I start to lose some understanding.  The datacards contain a key item and a value item, with the key being the name of the item and the value is obviously the value contained in that item. In the above screen grab I have selected the value item to see how it fetches my name from the dataset.  And now some questions:

  1. How does the Choices([@Tickets].Assignedto) formula work? And how can I find out what it is returning?
  2. Inside the data tab itself I can see the Primary text is set to DisplayName so the datacard somehow knows that this item is a person type with a name and an email etc.  What is going on here?

Now, my end goal here is actually to get at that Assignedto data for my own purposes.  The only way I've found is to use the Browse gallery like this: BrowseGallery.Selected.'Assigned To'.DisplayName.  This actually works, but I feel like I'm fudging it and that there should be a way to get at the item from within the Details page itself.

If anyone has advice it will be welcome.

 

Categories:
  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Assignedto is a lookup field.  Choices() loads all the potential values of the lookup.  See here: Choices function in Power Apps - Power Apps | Microsoft Docs

    But in general its not a good practice to try to get the values from the display form.  Normally the better way to do it would be like you are now.  Reference the Selected record in the gallery and access the actual value directly.  That is what the data card is bound to.  Its that binding that is used to fill in the DisplayName in the field in the form.  So using the selected record directly is actually more efficient.

  • bh4017 Profile Picture
    24 on at

    Thanks for your kind advice @Pstork1 

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard