Hi Team,
I am trying to render a PDF file from my SharePoint library (from the same tenant and the user has complete access) but what I see using the PDF Viewer is as below 🙄.
However, I can render the PDF if I update into media as "ExpenseReport.jpg" but the user wants to select the file dynamically.
https://<<Tenant-Name>>/sites/Practice/Shared%20Documents/ExpenseReport.pdf?csf=1&web=1&e=Iqp572
Please help if anyone see the same issue.
Regards,
Krishna
Solved! Go to Solution.
Hi @KrishnaV ,
You are using a different process (not the address - that is the same) for the content return. I use Get File Content Using Path and then simply use an Expression to retrieve it body('GetPDF')['$content'] (referring to the name I have given the previous step)
I am no Flow expert and I am not sure of the difference (if any) with Get File Content, but you have a Compose action in yours which I suspect may be the issue.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @KrishnaV ,
Sorry but the process is not that simple - I have a couple of apps that use this facility - my process is as follows
Firstly at App OnStart, set a Variable to the base address of your site and folder path.
Set(
stSite,
"https://xxxxxx.sharepoint.com/sites/xxxxxx"
);
Set(
stFolder,
"xxxxxxx/" //your folder path
)
Make a Flow (mine is PDFView) that does this.
This bit is actually from a gallery of PDF files - you can adapt it
Set(
stPDFName,
ThisItem.DocName
);
Set(
ViewPDF,
PDFView.Run(
stSite,
Concatenate(
"/",
stFolder,
First(
Split(
stPDFName,
"."
)
).Result,
".pdf"
)
)
)
Finally the Document in your PDF viewer will be
ViewPDF.pdf
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi Warren,
Thank you very much, I will certainly try this and let you know my output.
Regards,
Krishna
Hi Warren,
Thank you for your support and sincere apologies for the late response. I am not able to get through the issue and I see the below error:
I just made the flow as manual and want to ensure that it is working fine before I try through PowerAPP.
Thank you,
Krishna
Hi @KrishnaV ,
You are using a different process (not the address - that is the same) for the content return. I use Get File Content Using Path and then simply use an Expression to retrieve it body('GetPDF')['$content'] (referring to the name I have given the previous step)
I am no Flow expert and I am not sure of the difference (if any) with Get File Content, but you have a Compose action in yours which I suspect may be the issue.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi Warren,
Thank you for your time now I can see the data in PowerApps with PDF viewer only mistake I was doing is at the return to PowerApps step I am just sending body('GetPDF') now I updated it with an expression as body('GetPDF')['$content'].
Thank you once again to make my weekend with a happy closing 😎.
Regards,
Krishna
Hi, im trying to use Your code and i still cant see any PDF in the PDF VIewer.
In the flow, "Return to Power apps" the result is: (only the first line)
But when i look at the variable, "ViewPDF" after i run the Flow, i see that is empty. There is nothing in the variable.
ANy idea what can be wrong ?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.
User | Count |
---|---|
208 | |
98 | |
60 | |
51 | |
43 |
User | Count |
---|---|
257 | |
160 | |
85 | |
79 | |
57 |