cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Open PDF From OneDrive - Determined By Two Drop Down Selections

Hello,

Thanks in advance for any assistance!

 

Very new to Powerapps and commands...

I have a simple app that I want to create a button to open PDF from my OneDrive.

(I already have the dropdowns working as they should, I am now seeking button onselect assistance)

 

1 Table with 2 columns (Vendor and Material)

 

I would place the PDFs in the Vendor Folder with the File Name being the Material. (5 Vendors - Various Materials to each Vendor)

 

So I want the button to look to the Vender_Dropdown for the folder name, and the Material_Dropdown to find the pdf name.

 

Is this possible?

 

(if not, I am okay with placing all of the PDF's in one folder, and having the button look to the Material_Dropdown for the filename.)

 

((Example - Material_Dropdown displays "ACE", so I want the button to download "ACE.pdf" from the OneDrive location))

 

Thanks again for any help provided!

 

-Jason

5 REPLIES 5
Super User III
Super User III

Hi @JayScott ,

If you are asking whether you can dynamically create the opening URL for the PDF using Launch(), then yes, you can do that.

If you know the file name, the base address and the folders in the middle, it is a matter of concatenating it all and using Launch() to open it. Happy to assist with the syntax if you give me the structure of what you have done.

 

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.

Hello @WarrenBelz ,

 

First, thank you for your quick response.

Hopefully I detailed the below to your understanding... Thanks in advance!!!

 

So I have two drop downs and a download button. (data pulled from an excel table)

The first drop down "Vendor_Drop" will detail the Folder name. (which will be a subfolder)

The second drop down "Material_Drop" will detail the PDF file name.  (which is a pdf in the subfolder)

The download button would launch the PDF.

 

--I already have the dropdowns working together, but need the button to launch the appropriate file based on the Vendor_Drop (folder name), and Material_Drop (file name)--

 

Below is how I am seeing this linked.

(I get different link information based on if I gather it from the address bar, or right click the folder/file and select "copy link"

So I was not sure what to reference in the syntax.

 

Copied from Address Bar (SUBFOLDER Link)

https://OWNER.sharepoint.com/sites/SITENAME/Shared%20Documents/Forms/AllItems.aspx?newTargetListUrl=...

Copied from “Copy Link” right click option. (SUBFOLDER Link)

https://OWNEr.sharepoint.com/:f:/s/SITENAME /EgFLdKtDsbNFqqt6WSlVX6IBJspemjqxzq5q92YAXkesFA?e=nDMcLX

 

Copied from Address Bar (FILELink)

https://OWNER.sharepoint.com/sites/SITENAME/Shared%20Documents/Forms/AllItems.aspx?id=%2Fsites%2FSIT...

Coped from “Copy Link” right click option (FILE Link)

https://OWNER.sharepoint.com/:b:/s/SITENAME/EWeudH5kgZdOpBm3vX3OuO0B-Rnfap-C3jkESCwUqdIZqQ?e=MqYtzS

 

I imagine I am not doing this totally correct.

Any help would be appreciated!

Hi @JayScott ,

Just pulled one of mine directly off link - syntax is very easy

https://YourDomain.sharepoint.com/sites/YourSiteStructure/AnyOtherFolders/Vendor_Drop/Material_Drop.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 @JayScott ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

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.

Hello @WarrenBelz ,

 

Thanks for that Warren..

Unfortunately with my skill level (lack thereof), I am having a challenge applying this.

 

Would this be a single of commands placed in the Onselect for the button?

I still have a challenge of referencing the dropdowns (table) for the 1st Drop representing a folder name, and the 2nd Drop representing the PDF name..

 

Sorry for asking you to create this app FOR ME... lol.. And if you cannot easily provide the solution, I thank you for your help anyways..

 

 

Thanks again.

-Jason

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (19,796)