cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

PDF Image not Appearing in Gallery Image Control

Morning all!

 

I sense that victory is at hand. Can someone provide comment, based on the below, as to why I still cannot see the pdf files in the Gallery image control? All other aspects of the process seem to be working.

 

This is the Gallery when a pdf is the item in the Gallery. If the user clicks on the presumably blank image control the pdf DOES open as it should in a web view window, it is just not visible in the Gallery image control.

3csman_0-1614095388397.png

 

This is the Gallery when no document that matches parameters was found in the library. As you can see in the first item above the image control is sensing some kind of content, or the no record pic would show and not an empty box.
Capture2.JPG

 

This is the Gallery when an 'image' file is the item in the Gallery.

Capture1.JPG

 

This is the library showing the pdf files and their thumbnail. The SP library column is set to 'Picture'.

Capture3.JPG

 

This is the pdf web view when the Gallery item is a pdf files and the image control in the Gallery is clicked. So, the link to the pdf THROUGH the image control works, the user just can't see the

Capture5.JPG

8 REPLIES 8
v-bofeng-msft
Community Support
Community Support

Hi @3csman :

The point is that the image control cannot use URL to display PDF.So your formula can display pictures normally, but cannot display PDF.

With(
   {_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm},
   Coalesce(
      LookUp(CQImageCollection, StartsWith(Title, _common & " " & ThisItem.DteofCQ)), 
      LookUp(CQImageCollection, StartsWith(Title, _common))
   )
).'Link to item'

I assume CQImageCollection is your library.The formula should be:

With(
   {_common: ThisItem.CQYr & " " & ThisItem.UnqID & " " & ThisItem.CQTitle & " " & ThisItem.FrstNm & " " & ThisItem.LstNm},
   Coalesce(
      LookUp(CQImageCollection, StartsWith(Title, _common & " " & ThisItem.DteofCQ)), 
      LookUp(CQImageCollection, StartsWith(Title, _common))
   )
).Thumbnail.Large

 Best Regards,

Bof

3csman
Impactful Individual
Impactful Individual

Nope; Power Apps didn't like it.

3csman_0-1614262716234.png

 

Neither did it like Thumbnail.({Thumbnail}) -

3csman_1-1614262781771.png

 

Hi @3csman :

If you read my reply carefully, you should notice that the premise of the formula I provided is:
"I assume CQImageCollection is your library.".

1.JPG

I tasted it on my side and it worked well.
If the formula do not work on your side, I'm afraid the only explanation is that CQImageCollection is a table/collection you customize.

The normal way is to use the PDF viewer control and the URL of the file to display the PDF file, but because you also require the PDF to be displayed in the gallery, you will face two difficulties:

  • Can not insert a PDF viewer control in to a Gallery
  • The Image control can not use URL to display a PDF file

So the only way is to get the thumbnail from the SharePoint library and use the image control to display it.

Best Regards,

Bof

3csman
Impactful Individual
Impactful Individual

Thank you, sir.

 

I changed the source to the library; Power Apps still doesn't like it.

3csman_0-1614307055399.png

 

And, here is a screenshot of the library, in case you're wondering what that looks like. The line item matches the condition parameters. I should see the below thumbnail in the above image control, yes?

3csman_4-1614307449847.png

 

 

v-bofeng-msft
Community Support
Community Support

Hi @3csman :

I've made a test but did not encountered the problem you mentioned.

1\My gallery item

["TheImage","Dynamics 365 Licensing Guide Feb 2021"]

2\image

With({__common:ThisItem.Value},Coalesce(
    LookUp(picc,StartsWith(Name,__common)),
    First(picc)
)).Thumbnail.Large

1.JPG2.JPG

I have never encountered your problem. I suggest you save your library to a collection and check its data structure:

1\add a button and set it's OnSellect property to

ClearCollect(TestCollection222,picc)

2\Check TestCollection222

9.gif

Best Regards,

Bof

3csman
Impactful Individual
Impactful Individual

I tried it a dozen different times. Still nothing.

 

Does it matter to your condition that the data is coming from a 'List' and the images are in a 'Library'?

How does the condition know which image to retrieve without tying the item in the 'List' and the item in the 'Library' together?

Hi @3csman :

In my opinion, no matter what method is adopted, just make sure that the corresponding item can be retrieved from this library.

Best Regards,

Bof

3csman
Impactful Individual
Impactful Individual

Yes, sir. I've tried that.

A blank box appears when its a pdf that is recalled to the image control.

 

I have the process set up so that if no matching document is available in the library (image or pdf), another image, in the shape of a post-it sticker overlays the Gallery image control, and reads 'No Document Available'.

 

This ONLY appears when there is no document 'present' in the image control.

 

When there is a pdf document 'present' in the box (even though I cannot see the pdf thumbnail), the 'No Document Available' image does not show.

 

I have deduced that the process IS delivering the pdf to the image control, because the image control is empty put there is no 'No Document Available' image either.

 

However, if I click on the empty box (image control) and there is a pdf 'present' the pdf DOES open in a full web view. So, the pdf is there in the image control, I just can't see it. Very strange.

 

Thank you for your assistance!

Helpful resources

Announcements
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!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

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 (59,151)