cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DipenShha
Level: Powered On

Error while Download or Launch File under power app button

Hello All,

 

I have created an app with datasource Excel file.
In excel file i have a column for document path.

Document path is a sharepoint document which is stored in sharepoint online document library.

When i try to launch file from the power apps i got the error that "Can not display PDF file. File can not be open" and during download the file i got error like "The URL passed to the function nis not valid"

 

I think this issue is generated because of the permssion.

 

How can i overcome it? i don't want to change the datasource from excel to sharepoint list as we need records from multiple lists in sharepoint.

 

Can anyone help me out?

5 REPLIES 5
Sru
Level 8

Re: Error while Download or Launch File under power app button

hi @DipenShha,

 

I tried below solution to lauch pdf and it works fine. .

 

Created excel file as data source with two columns one with title and to hold document path .

c3.png

  1. In power apps created a new screen and with List screen template
  2. used labels to display titles(column1)
  3. using launch() function on label's OnSelect method open the urls.

 

c4.PNG

 

when you click on the titles they are opening the pdf's. pdf files referenced in column2 are stored in sharepoint online document libary. Hope this helps

 

Thanks,

Sru

DipenShha
Level: Powered On

Re: Error while Download or Launch File under power app button

@SruThnaks for the information.

I have some queastions.

have launch document in browser or in mobile in power app?

Sru
Level 8

Re: Error while Download or Launch File under power app button

Hi @DipenShha

 

its in browser.

 

if you try in mobile powerapp (ios ). it will ask for sign in (authentication) and then opens up the pdf.

 

thnks,

Sru

DipenShha
Level: Powered On

Re: Error while Download or Launch File under power app button

I am trying with android phone.

It gives me error that "Can not Diaply PDF(Test.pdf).PDF can not be opned"

it is not redirecting to login page of sharepoint.

 

What would be done if i am open pdf from android phone and PDF path is sharepoint document library path in excel sheet?

Sru
Level 8

Re: Error while Download or Launch File under power app button

Hi @DipenShha

 

when you try to open a link to Pdf , you will see a popup for downloading it.

 

1) I tried to open via a link in android phone, asked for sign in and then based on the browser it asked me to download and provided a option to view. Both worked fine.

 

2) tried thru power apps and same thing happend. I was asked for download and then opened it works fine.

 

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 173 members 4,585 guests
Please welcome our newest community members: