cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eben98
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

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
VijayTailor
Resident Rockstar
Resident Rockstar

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."

 

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

You can filter Image Accordingly (See below).

VijayTailor_0-1600855216849.png

 

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

Thanks in Advance. 

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."

@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.

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

Thank you @VijayTailor .

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,435)