cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jaos291
Helper II
Helper II

Get all possile info from a row in sharepoint to powerapps

Greetings

 

I have a list in sharepoint that has common info, like Name, Occupation etc. I know that sharepoint has an internal unique ID for every single row. I have already found the ID and took it into Powerapps but I need to get the info from that specific ID, lets say that ID #1 has Jhon as name and Teacher as Occupation, I need this two in two diferent variables to take them to another screen in powerapps, I'm still a newbie in managing sharepoint and powerapps

 

Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Srautio
Advocate I
Advocate I

If I understand you correctly you have a Sharepoint List datasource and you want to get a specific list Item then you should be able to store that specific list item in a global variable.

Set(listItem, Lookup(SPListSource, ID = [ID of the item you want]))

Depending on how you present the list of items there are multiple ways you can get the ID of the item.

If you are using a Gallery to display the Sharepoint List you could use

Set(listItem, GalleryName.Selected)

Then displaying the items different properties is a simple case of using the variable name like so

listItem.Name
listItem.Occupation

Hope that helps

View solution in original post

3 REPLIES 3
Srautio
Advocate I
Advocate I

If I understand you correctly you have a Sharepoint List datasource and you want to get a specific list Item then you should be able to store that specific list item in a global variable.

Set(listItem, Lookup(SPListSource, ID = [ID of the item you want]))

Depending on how you present the list of items there are multiple ways you can get the ID of the item.

If you are using a Gallery to display the Sharepoint List you could use

Set(listItem, GalleryName.Selected)

Then displaying the items different properties is a simple case of using the variable name like so

listItem.Name
listItem.Occupation

Hope that helps

View solution in original post

wyotim
Resident Rockstar
Resident Rockstar

 

Hey @Jaos291, besides what @Srautio shared, which was a great way to do it, the Navigate function can take variables locally between screens. Here is a sample from the documentation found here.  

 

Navigate( Details, ScreenTransition.Fade, { ID: 12 , Shade: Color.Red } )

This is navigating to the Details screen, using a Fade transition (i.e. animation between screens) and taking the ID and Shade variables set at "12" and "Color.Red" respectively. 

You could assign a variable instead of a specific item by using something like MyGallery.Selected.ID. In fact, if the screen you are navigating to has an association with the table you are trying to reference (like you are navigating to a screen with a form) you could just pass the ID variable and not the Name and Occupation. Otherwise, you could just as easily pass those two local variables as in the example code above, or set a global variable as @Srautio showed, which has the benefit of being able to be used on any screen.

This was really helpful 

 

Thanks a lot!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,451)