cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Show only the images of the attachments uploaded to the sharepoint list

I have the following formula in my gallery and it works well, return all attachments                          

                                                                   

Lookup(
'Facturation control';
ID = Gallery3_2.Selected.ID
) 'Attachments'

 

but now i just want to show the attachments which are images using something like

 

EndsWith (Attachments.DisplayName; "jpg") Or EndsWith (Attachments.DisplayName; "png")


How can I implement these formulas in the filter?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Show only the images of the attachments uploaded to the sharepoint list

Hi @King ,

Try the below:

 

 

Filter(Lookup(
'Facturation control';
ID = Gallery3_2.Selected.ID
).'Attachments',EndsWith(DisplayName,"jpg") || EndsWith(DisplayName,"png"))

 

 

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

View solution in original post

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Show only the images of the attachments uploaded to the sharepoint list

Hi @King ,

Try the below:

 

 

Filter(Lookup(
'Facturation control';
ID = Gallery3_2.Selected.ID
).'Attachments',EndsWith(DisplayName,"jpg") || EndsWith(DisplayName,"png"))

 

 

 
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Show only the images of the attachments uploaded to the sharepoint list

Thanks for answering @KrishnaV 

 

your formula works just remove the DisplayName from this part:


. 'Attachments'.DisplayName

 

The formula I used was:

 

Filter (Lookup(
'Facturation control';
ID = Gallery3_2.Selected.ID
) 'Attachments', EndsWith (DisplayName, "jpg") || EndsWith (DisplayName, "png"))

 

since I show the images with the property

AbsoluteUri

thanks for giving me the solution

Highlighted
Community Champion
Community Champion

Re: Show only the images of the attachments uploaded to the sharepoint list

that was just copy-paste error, I have used it in my local without .displayname. however, I have corrected so that the new members make use of that. thank you for letting me know.

 

Regards,

Krishna

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,189)