cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Showing a particular image from attachments

Hi all,

 

I need your help.

I want to show only a particular image from my attachments. I am unable to do tat.

I tried to do using, filter and startswith. But it didn't work.

below are the images from my sharepoint site. 

 

1.PNG

 Image 1:  This is my sharepoint list with the record.

Under the attachments u can see there are 3 files. i want to show only tat passport image in power apps.Under the attachments u can see there are 3 files. i want to show only tat passport image in power apps.

Image 2: This is image of the attachments. under the Attachments, I have 3 files here.

Image 3: In power apps , i want to get only the "Passport size photo" file and show it in an image control. 

i know in the above image there is only one image file, but wat if there are 5 images files for example

lets say there are 5 image files in jpg format . 

                                  Foot.jpg

                                  ball.jpg

                                  Wifi.jpg

                                 sound.jpg

                                   speaker.jpg

How can can I only get sound.jpg and show it in my image control.

here i want to get only tat passport image from attachments and show it in this image controlhere i want to get only tat passport image from attachments and show it in this image control

 

Please do reply soon. Thanks in Advance.

 

Best Wishes,

Eben.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Memorable Member
Memorable Member

Re: Showing a particular image from attachments

If the Name of the Image  is the Same always then you can use like below.

Spoiler
First(Filter(ThisItem.Attachments,".jpg" in DisplayName && Lower("Passport Size") in Lower(DisplayName))).AbsoluteUri

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."




View solution in original post

8 REPLIES 8
Highlighted
Memorable Member
Memorable Member

Re: Showing a particular image from attachments

Hi,
You can use Like that.
First(ThisItem.Attachments).AbsoluteUri

VijayTailor_0-1600852422784.png

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Highlighted
Advocate II
Advocate II

Re: Showing a particular image from attachments

@VijayTailor  wat if i didnt want the first item and wanted the third ?

Highlighted
Memorable Member
Memorable Member

Re: Showing a particular image from attachments

You can filter Image Accordingly (See below).

VijayTailor_0-1600855216849.png

 

Highlighted
Advocate II
Advocate II

Re: Showing a particular image from attachments

@VijayTailor , What if there are more images in jpg format. how can the filter be done.

Thanks in Advance. 

Highlighted
Memorable Member
Memorable Member

Re: Showing a particular image from attachments

Its depends on your Business requirement. Like how many Images they want to Display.

above comment - formula use to get the only the first image of ".jpg" formate.

Now to can Modify as per your requirement Like instead of ".jpg" you can filter ".png". 

VijayTailor_0-1600859794355.png

 



if need to display More image then use the gallery and pass the filter expression.

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Advocate II
Advocate II

Re: Showing a particular image from attachments

@VijayTailor , Thank you. But your solution does not solve my problem.

 

So I m attaching this image below. 4.PNG

So if you look clearly in my image. You can see there are so many jpg files.

In that I only want to get Passport Size Photo and show it in a image. 

Can u help me out here.

 

Thanks in Advance.

 

Best wishes,

Eben.

Highlighted
Memorable Member
Memorable Member

Re: Showing a particular image from attachments

If the Name of the Image  is the Same always then you can use like below.

Spoiler
First(Filter(ThisItem.Attachments,".jpg" in DisplayName && Lower("Passport Size") in Lower(DisplayName))).AbsoluteUri

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."




View solution in original post

Highlighted
Advocate II
Advocate II

Re: Showing a particular image from attachments

Thank you @VijayTailor .

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (8,755)