Forum Discussion
Retrieve attachment from SharePoint online list
- 8 years ago
I'm not sure what you mean. If I use that link format, I can get to any attached picture in SharePoint in my browser. Not sure what you are trying to achieve or how you are trying to access it. If you have the SharePoint as a trusted site, you can use URL's in that format to add images to your Power BI Desktop report. Can you explain your use case?
- 8 years ago
I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you Greg_Deckler
- 8 years ago
I know this is marked as solved, but was one of the first hits on google and did not fit my use case.
I wanted to add a link to an excel file that was attached to a sharepoint list item.
1. Open the Query Editor and find the column named AttachmentFiles
2.Expand the table with the double arrow and select ServerRelativeURL. This will give you a new column called AttachmentFiles.ServerRelativeURL
3. Add a custom column to concat your Sharepoint URL and the Path like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]
4. Save and close the Query Editor
5. In the data table view, select the custom column you created and in the modeling tab select Data Category:Web URL
6. Add the custom column to your table visual and in formatting/values select URL Icon true to keep tidy.
Well, a link to a SharePoint list item attachment has the following format:
https://[site url]/Lists/[List Name]/Attachments/[Item ID]/[File Name]
Yes but for some reason its just text field not the link.
- Greg_Deckler8 years agoCommunity Champion
I'm not sure what you mean. If I use that link format, I can get to any attached picture in SharePoint in my browser. Not sure what you are trying to achieve or how you are trying to access it. If you have the SharePoint as a trusted site, you can use URL's in that format to add images to your Power BI Desktop report. Can you explain your use case?
- shippyatdrexel4 years agoRegular Visitor
I know we're a few years into this post but there's a big difference if you are using the 1.0 version of the SharePoint LIst connector vs the 2.0 Beta version as of the time i'm writing this in January 2022. The 1.0 version let's you do what Mallev is suggesting; however, the 2.0 Beta version doesn't. It just shows up with an Attachments field that has a value of a 0 or 1. The 2.0 version is so much faster and easier to use. So what I ended up doing was creating two connections. My first uses the 2.0 connection and pulls everything i need EXCEPT for AttachmentFiles, and a 1.0 connection that only pulls the AttachmentFiles and the item ID. Then I merge the two queries on the Item ID. Works pretty good, it's just really slow. I hope they add the capability to the 2.0 connection!
- mudegowdrp8 years agoHelper II
I tried few ways to do that. Best way is to have a llink and it works as you told. Thank you Greg_Deckler
- Mallev8 years agoAdvocate I
I know this is marked as solved, but was one of the first hits on google and did not fit my use case.
I wanted to add a link to an excel file that was attached to a sharepoint list item.
1. Open the Query Editor and find the column named AttachmentFiles
2.Expand the table with the double arrow and select ServerRelativeURL. This will give you a new column called AttachmentFiles.ServerRelativeURL
3. Add a custom column to concat your Sharepoint URL and the Path like this ="https://mysite.sharepoint.com" & [AttachmentFiles.ServerRelativeUrl]
4. Save and close the Query Editor
5. In the data table view, select the custom column you created and in the modeling tab select Data Category:Web URL
6. Add the custom column to your table visual and in formatting/values select URL Icon true to keep tidy.