Hi @Carmen15
So down in the Comments section of Reza's video is the solution for this:
https://www.youtube.com/watch?v=vqK29FWbLxU
Users found that the "appres://" link was specific to the user id. If this link was hard coded, it would only work for the user that set it up. You need to make sure that this part of the code is dynamically changing:
Substitute(
LookUp(
Documents,
Name = "DONOTREMOVE"
).Pic,
"%252fShared%252520Documents%252fDONOTREMOVE.png",
""
)
After reading the comments for the video I think it would be better to change the formula from a Substitute to this:
First(
Split(
LookUp(
Documents,
Name = "DONOTREMOVE"
).Pic,
"path=%252f"
)
).Value & "path=%252f"
Then it does not matter what your Document Library is named. The above code splits the "appres://" link at the "path=" spot so that you can set it to the file you want to see.
To validate things look correct, put a Text Label on your form where users can see the entire thing. To start with just set the text to:
LookUp(
Documents,
Name = "DONOTREMOVE"
).Pic
You should get a value that starts with "appres://datasources/" if everything is configured correctly.
Publish the app and have some users open the app. Have them grad the value of that label. If you compare the values of the text label, you should see then entire thing is the same except for one section that contains a guid identifying the user.

If they are both the same then something is not setup correctly.
This is the new more generic code for the Document property of the PdfViewer control:
If(
Last(
Split(
Gallery3.Selected.'File name with extension',
"."
)
).Value = "pdf",
//You need to watch this video and follow all the steps for PDF
//https://youtu.be/vqK29FWbLxU?t=956
//You have to add a "Pic" Column to the Document Library as HyperLink.
//Set it manually to the file url using the Full Path
//Change the "Pic" column to Picture.
//Reza has Pinned the first Comment for the video from @DarrenCarlson. Make sure you read that
First(
Split(
LookUp(
Documents,
Name = "DONOTREMOVE"
).Pic,
"path=%252f"
)
).Value & "path=%252f" & EncodeUrl(Gallery3.Selected.'Folder path' & Gallery3.Selected.'File name with extension'),
Substitute(
Gallery3.Selected.Thumbnail.Large,
"/thumbnail",
"/pdf"
)
)
If you have something different for the Document property, share it here and we can take a look.
-Mark