cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Save PDF as a link in SharePoint List

Hi Power Apps community,

 

I have created an app in Power Apps that create a quote for clients. The app is very simple, the client choose a product, enter the quantity and the total will be calculated. The information will be saved in SharePoint. I want to give the clients the opportunity to convert their information as a PDF and the ability to print their quote/ invoice. This is not mandatory for the clients but it is a requirement for the App. Currently, I know how to create a PDF file but this will be saved in One Drive or SharePoint. Which means that if a client want to see their invoice, they need to enter One Drive or SharePoint, which is not possible because otherwise they will see sensitive data and data from other clients also.

 

Seeing that many clients will be using the app, I want to built the app that a user can convert their entered data as PDF and when they return to the app they can see the PDF corresponding to the user.

 

Is this possible with Power Apps?

I hope that I have provided enough information and any help will be much appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Resident Rockstar
Resident Rockstar

Re: Save PDF as a link in SharePoint List

Hi @JB0007 

 

I used to have the same scenario , the solution is to create a shareable link through Power Automate for your generated file and save this Generated Shareable Link and then the users can use this Shareable link and can't access other sensitive information.

 

To generate shareable link for your saved sharepoint file you can use the below action: 

Where Item Id is the the ID of your file you have already generated and saved.

Mira_Ghaly_0-1596070574646.png

You can use the below step to get the file id (Item ID), by passing the file path

Mira_Ghaly_1-1596070675894.png

 

If this post helps you with your problem, please mark your as Accepted solution.

 

If you like my response, please give it a Thumbs Up.

 

MG (Naturally Curious)

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Community Support
Community Support

Re: Save PDF as a link in SharePoint List

Hi @JB0007 ,

Could you please share a bit more about your scenario?

Do you want to not store your generated PDF file in SP Library or OneDrive folder?

 

Regarding the needs that you mentioned, I think it is not necessary to go to OneDrive or SharePoint to review the generated PDF file, instead, you could review the PDF file in your canvas app directly.

 

On your side, I assume that you store your PDF file into your OneDrive folder, in your flow, you could consider add a "Create share link" action of OneDrive connector to generated shared url link for the generated PDF file, and then you could return generated shared url back to your canvas app. After that, in your canvas app, you could use the PDF Viewer control to review the PDF file directly.

 

Flow's configuration as below:

4.JPG

Note: For file name of the generated PDF file, you could make it as dynamic value. You could add a "Ask in PowerApps" dynamic content within the File Name field of the "Create file 2" action, to receive file name passed from your canvas app.

 

App's configuration as below:

5.JPG

 

6.JPG

 

On your side, you could consider add a Text type column (called "Generated Url Link") in your SP List to store above generated shared url link of the PDF file. When you run the app next time, you could preview the PDF file through the stored "Generated Url Link" column value directly. For Example, you add a Gallery in your app to list all available records, add a "PDF" icon inside it, set the Visible property of this icon to following:

If(
    !IsBlank(ThisItem.'Generated Url Link'),
    true,
    false
)

set the OnSelect property of this icon to following:

Naviagte(PDFViewerScreen)

Within the PDFViewerScreen (please add this new screen in your app firstly), add a PDF Viewer control, set the Document property to following:

BrowseGallery1.Selected.'Generated Url Link'

 

Please try above solution, then check if it could solve your problem.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Resident Rockstar
Resident Rockstar

Re: Save PDF as a link in SharePoint List

Hi @JB0007 

 

I used to have the same scenario , the solution is to create a shareable link through Power Automate for your generated file and save this Generated Shareable Link and then the users can use this Shareable link and can't access other sensitive information.

 

To generate shareable link for your saved sharepoint file you can use the below action: 

Where Item Id is the the ID of your file you have already generated and saved.

Mira_Ghaly_0-1596070574646.png

You can use the below step to get the file id (Item ID), by passing the file path

Mira_Ghaly_1-1596070675894.png

 

If this post helps you with your problem, please mark your as Accepted solution.

 

If you like my response, please give it a Thumbs Up.

 

MG (Naturally Curious)

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted
Impactful Individual
Impactful Individual

Re: Save PDF as a link in SharePoint List

First question is. Do these clients have accounts in your AAD to be able to access the app you are creating? Powerapps won’t let anonymous access and sharing links like SharePoint can for them to access the apps. They must have an AAD account created and or invited as a full guest user to your tenant to access and there is a license consideration as well! Just thought I’d mention that! 

Highlighted
Community Support
Community Support

Re: Save PDF as a link in SharePoint List

Hi @JB0007 ,

Could you please share a bit more about your scenario?

Do you want to not store your generated PDF file in SP Library or OneDrive folder?

 

Regarding the needs that you mentioned, I think it is not necessary to go to OneDrive or SharePoint to review the generated PDF file, instead, you could review the PDF file in your canvas app directly.

 

On your side, I assume that you store your PDF file into your OneDrive folder, in your flow, you could consider add a "Create share link" action of OneDrive connector to generated shared url link for the generated PDF file, and then you could return generated shared url back to your canvas app. After that, in your canvas app, you could use the PDF Viewer control to review the PDF file directly.

 

Flow's configuration as below:

4.JPG

Note: For file name of the generated PDF file, you could make it as dynamic value. You could add a "Ask in PowerApps" dynamic content within the File Name field of the "Create file 2" action, to receive file name passed from your canvas app.

 

App's configuration as below:

5.JPG

 

6.JPG

 

On your side, you could consider add a Text type column (called "Generated Url Link") in your SP List to store above generated shared url link of the PDF file. When you run the app next time, you could preview the PDF file through the stored "Generated Url Link" column value directly. For Example, you add a Gallery in your app to list all available records, add a "PDF" icon inside it, set the Visible property of this icon to following:

If(
    !IsBlank(ThisItem.'Generated Url Link'),
    true,
    false
)

set the OnSelect property of this icon to following:

Naviagte(PDFViewerScreen)

Within the PDFViewerScreen (please add this new screen in your app firstly), add a PDF Viewer control, set the Document property to following:

BrowseGallery1.Selected.'Generated Url Link'

 

Please try above solution, then check if it could solve your problem.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Save PDF as a link in SharePoint List

Hi @cwebb365  thanks for the reply,

 

Yes we give our clients an account in AAD. SO they can access the application without any problems.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,432)