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

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
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (36,748)