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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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