cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Helper I
Helper 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
Highlighted
Helper I
Helper 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

Highlighted
Super User
Super User

 

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.

Highlighted

This was really helpful 

 

Thanks a lot!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,417)