Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

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:



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



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)



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.



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


Frequent Visitor

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.

Hi @grhaberer,


Variable works from my side:




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.




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

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (53,302)