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

Dynamically Display PDF name based on passed context

I am trying to pass a context variable with a PDF name to a PDF viewer screen to display a PDF (dynamically based on the variable passed). It is not working. Here are some screenshots.

 

Screenshot 1: initial screen passing context variable via "Navigate" function:

pic1.jpg

 

Screenshot 2: Next screen (where "Navigate" goes to), with p_file context variable displaying as text at top of the screen

pic2.JPG

 

Screenshot 3: Same screen showing "Document" function for PDF Viewer with static text -- this correctly displays the PDF (text matches the p_file variable from previous screenshot)

pic3.JPG

 

Screenshot 4: Same screen but "Document" has been changed from static name of PDF to p_file (which contains the same "string") and the PDF no longer displays.

pic4.JPG

 

So in conclusion, I'd love to be able to use a single screen to dynamically display PDFs based on their name -- instead of having to create a million different screens and display PDFs using static string names.  Is this possible?

 

Side note: I really would like to be able to view PDFs that are stored on SharePoint, instead of within the app, but that has already been well documented and has been "Planned" for development for an exceedingly long time already.

 

Session ID: a4036cc8-8a02-e95e-a822-ae61554637b0
PowerApps 2.0.730

 

2 REPLIES 2
grhaberer
Level: Powered On

Re: Dynamically Display PDF name based on passed context

As an update, when I publish the app and run it, the PDF does not display in the viewer regardless of whether I hardcode the PDF name or use a context variable.

 

Tested using a surface pro and iphone.

 

It is really quite unfortunate that the PDF viewer is essentially useless.  I show executives a prototype and they LOVE it, but without being able to display PDFs, the solution is useless.

Community Support Team
Community Support Team

Re: Dynamically Display PDF name based on passed context

Hi @grhaberer,

 

Variable works from my side:

20.PNG21.PNG

 

 

I think the issue here should be the value of the Variable.

From your screen, it seems that the Variable is collecting the string, not the corresponding name of the PDF file.

Which should be similar to the issue in the following thread:

Image and list

 

To workaround this, please consider to create a collection to hold the name string and the corresponding PDF name (the file, or the URL), then use the lookup function to match the corresponding PDF file.

 

Regards,

Michael

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

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: 58 members 4,420 guests
Please welcome our newest community members: