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!
Solved! Go to Solution.
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
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
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!
User | Count |
---|---|
227 | |
101 | |
93 | |
56 | |
30 |
User | Count |
---|---|
288 | |
116 | |
109 | |
62 | |
58 |