Hello,
I have PowerApps gallery which the data source is from SharePoint and each item got their own attachment in PDF format. Is it possible to view the attachment in the PowerApps in PDF viewer?
Thanks.
Regards,
Nik
Solved! Go to Solution.
Hi @nikfikrie92 ,
Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Please check the LookUp(Gallery1.Selected.Attachments,DisplayName = "PDF File.pdf").Value formula could return a proper result looks like below:
appres://datasources/20190325_case13/table/b34320dc-c867-4df9-a543-cd9fe16ed81f/rows/1/reference/https:%2F%2Fasia-001.azure-apim.net%2Fapim%2Fsharepointonline%2F627bfba80bae4e8e899df7a03b3195bb%2Fdatasets%2Fhttps%25253A%25252F%25252Fxxxxx.sharepoint.com%25252Fsites%25252FPowerApps%2Ftables%2Fb34320dc-c867-4df9-a543-cd9fe16ed81f%2Fitems%2F1%2Fattachments%2F%2525252fLists%2525252f20190325_case13%2525252fAttachments%2525252f1%2525252fHTTPS-FAQ.pdf%2F$value
Also please check if the selected item in your Gallery contains a attachment file whose name is 'PDF File.pdf', if not, the PDF Viewer control would display empty.
You could consider add another Gallery (Gallery2) within your app, then set the Items property to following:
Gallery1.Selected.Attachments
then within the Gallery, add a Label control, set the Text property to following:
ThisItem.DisplayName
then the Gallery2 would show all available PDF files attached to the selected item in your Gallery1.
Best regards,
Hi @nikfikrie92
Hi @yashag2255 ,
Thank you so much! It work for this formula
First(Gallery1.Selected.Attachments).Value
But it doesnt work when I used LookUp(Gallery1.Selected.Attachments,DisplayName = "PDF File.pdf").Value
It just displays a blank pdf. What does DisplayName = "PDF File.pdf" refer to? Does DisplayName refer to my column or I need to change something on "PDF File.pdf"? Can you help me verify this?
Thank you so much!
Regards,
Nik
Hi @nikfikrie92 ,
Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
Please check the LookUp(Gallery1.Selected.Attachments,DisplayName = "PDF File.pdf").Value formula could return a proper result looks like below:
appres://datasources/20190325_case13/table/b34320dc-c867-4df9-a543-cd9fe16ed81f/rows/1/reference/https:%2F%2Fasia-001.azure-apim.net%2Fapim%2Fsharepointonline%2F627bfba80bae4e8e899df7a03b3195bb%2Fdatasets%2Fhttps%25253A%25252F%25252Fxxxxx.sharepoint.com%25252Fsites%25252FPowerApps%2Ftables%2Fb34320dc-c867-4df9-a543-cd9fe16ed81f%2Fitems%2F1%2Fattachments%2F%2525252fLists%2525252f20190325_case13%2525252fAttachments%2525252f1%2525252fHTTPS-FAQ.pdf%2F$value
Also please check if the selected item in your Gallery contains a attachment file whose name is 'PDF File.pdf', if not, the PDF Viewer control would display empty.
You could consider add another Gallery (Gallery2) within your app, then set the Items property to following:
Gallery1.Selected.Attachments
then within the Gallery, add a Label control, set the Text property to following:
ThisItem.DisplayName
then the Gallery2 would show all available PDF files attached to the selected item in your Gallery1.
Best regards,
Hi @v-xida-msft ,
Thank you, I use
LookUp(Gallery1.Selected.Attachments,DisplayName = DisplayName).Value
Then It works like a charm. Because I don't want to specify the PDF document to any specific name.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
198 | |
171 | |
60 | |
32 | |
31 |
User | Count |
---|---|
339 | |
270 | |
104 | |
72 | |
56 |