cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Hclor
Regular Visitor

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Super User
Super User

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

@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

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Regular Visitor

@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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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
Regular Visitor

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,567)