cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hclor
New Member

How to link to a SharePoint item by ID in PowerApps

I am customizing a SharePoint list in PowerApps. On one screen I have, it displays all items with a filter applied. (Basically it shows all items with the same serial number from the previous screen.) I can make these hyperlinks, but "OnSelect", I want it to take them to that item. If I do Navigate to another screen, how would I have it populate with the data from the item they clicked on?

I also want them to be able to see or click on any attachments that list item contains. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Hclor 

Change your Item property formula to:

   LookUp(yourDataSource, ID=DataTable1.Selected.ID)

That should give you what you need.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

10 REPLIES 10
Nogueira1306
Community Champion
Community Champion

Hey! To see the item, on select navigate to another screen with a form and in the form Item property write: 

Gallery1.Selected

That will show the item.

 

I don´t think it is possible to show the attachments but I know that you can download it. But I think you cant preview it

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

This halfway worked, it seems to show the item data, but it does not show the attachment. (I used DataTable1.Selected) It says "There is nothing attached." in the attachment field, which is not true... the item does has an attachment. Do you know how to get it show the attachment or a link to the attachment?

RandyHayes
Super User
Super User

@Hclor 

Change your Item property formula to:

   LookUp(yourDataSource, ID=DataTable1.Selected.ID)

That should give you what you need.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

@RandyHayes This is giving me the same results as @Nogueira1306 's solution. See screenshot. (I added a comment in the SharePoint item that has an attachment to make sure it was showing the correct item, still no attachment)Screenshot 2021-08-27 114652.jpg

Nogueira1306
Community Champion
Community Champion

Hey! Watch this video:

 

https://www.youtube.com/watch?v=eZtOVvbj9qw 

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

RandyHayes
Super User
Super User

@Hclor 

Have you made any alterations to the form?

What is the Default property of your DataCard for the attachments?  What is the Items property of the attachment control inside of the DataCard?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Hclor
New Member

@RandyHayes Ahh, that may be it. I was working on this with another user and it looks like the properties have been altered. Attachments Datacard value Items properties= AttachmentsMain and Attachements datacard default= ThisItem.'{Attachments}'
Would it be easiest to delete the form and re-insert it? 

RandyHayes
Super User
Super User

@Hclor 

You can remove the attachment datacard from the Field edit of the form and then add it back in.  That would be easiest.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Hclor
New Member

Yes! That worked. So simple, wow. Thank you, @RandyHayes !!

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,136)