cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Create Filtered Collection from SP Attachments Field

Hello everyone,

 

First post here... thanks for the assistance in advance!

 

Scenario

 

Criteria 1: (achieved)

I need to create a collection based on the SharePoint attachments field of a record that has been selected in a gallery. This I've been able to achieve 😀

 

I have a Gallery that's feeding a Edit Form and the form will display the selected item from the gallery. I then create a collection based on the value of the attachments datacard, so far so good. The SP attachments field has more than one attachment, so my collection will have multiple items.

 

Criteria 2: (not achieved)

What I really need is to create a filtered collection where the only item in that collection is equal "Signature.jpg". The end result would be to have a collection with a single item but must have the Name and Value field. Please see pics below.

 

I've tried multiple solutions, but since I'm dealing with filtering an image file name, I just haven't been able to achieve this...😭

Anyway, your help is much appreciated!!!

 

 

 

 

Signature1.png

 

Collection

Signature3.png

 

Result

Signature2.png

 

SharePoint fields

Signature4.png

 

Thanks again for all your help!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Create Filtered Collection from SP Attachments Field

@MoraisDev ,

I have this working perfectly on a similar collection of attachments with exactly the same structure (Name and Value in collection of attachments). The error you are getting is a bit strange as it is suggesting name is a table whereas your screenshot showed the same as mine which was a text value. Also does ThisItem.Name show as text in your colPics gallery?

Try another gallery with the items 

 

Lookup(colPics,Name = "Signature.jpg")

 

and see if you get only that item.

 

View solution in original post

Highlighted
Frequent Visitor

Re: Create Filtered Collection from SP Attachments Field

@WarrenBelz 

 

With your guidance, I was able to get it to work!!! Thank you!!!

 

 To show in a gallery:

Items Property:

LookUp(colPic,Name="Signature.jpg")

 

Image Property:

ThisItem.Value

 

To Show in a standalone image control:

Image Property:

LookUp(colPic,Name="Signature.jpg").Value

 

Thank you for your help!!! Much appreciated!!!

View solution in original post

7 REPLIES 7
Highlighted
Community Champion
Community Champion

Re: Create Filtered Collection from SP Attachments Field

Hi @MoraisDev ,

In a gallery to display only the item chosen

Lookup(colPic,Name="Signature.jpg")

If you want to display the image, put in an Image Control in the gallery with the Image property

Text(ThisItem.Value)

 or outside the gallery

Text(LookUp(colPic,Name="Signature.jpg").Value)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Frequent Visitor

Re: Create Filtered Collection from SP Attachments Field

@WarrenBelz 

 

Thank you for your reply. I've tried as instructed and was unable to display only one item in the gallery or outside the gallery, please see below.

 

Signature6.pngSignature5.png

Highlighted
Community Champion
Community Champion

Re: Create Filtered Collection from SP Attachments Field

Almost there

Image is (yes I know it does not make sense)

Text(LookUp(colPic,Name="Signature.jpg").Value)

Name is 

LookUp(colPic,Name="Signature.jpg").Name

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Frequent Visitor

Re: Create Filtered Collection from SP Attachments Field

@WarrenBelz 

 

Thanks for the prompt reply. Unfortunately, it didn't work... Please see below.

 

Signature7.pngSignature8.png

Highlighted
Community Champion
Community Champion

Re: Create Filtered Collection from SP Attachments Field

@MoraisDev ,

I have this working perfectly on a similar collection of attachments with exactly the same structure (Name and Value in collection of attachments). The error you are getting is a bit strange as it is suggesting name is a table whereas your screenshot showed the same as mine which was a text value. Also does ThisItem.Name show as text in your colPics gallery?

Try another gallery with the items 

 

Lookup(colPics,Name = "Signature.jpg")

 

and see if you get only that item.

 

View solution in original post

Highlighted
Frequent Visitor

Re: Create Filtered Collection from SP Attachments Field

@WarrenBelz 

 

With your guidance, I was able to get it to work!!! Thank you!!!

 

 To show in a gallery:

Items Property:

LookUp(colPic,Name="Signature.jpg")

 

Image Property:

ThisItem.Value

 

To Show in a standalone image control:

Image Property:

LookUp(colPic,Name="Signature.jpg").Value

 

Thank you for your help!!! Much appreciated!!!

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Create Filtered Collection from SP Attachments Field

Hi @MoraisDev ,

Mine actually works on that as well

Anyway I am glad you solved it.

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 (8,055)