cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattP13
Resolver I
Resolver I

Filter formula only returning 1 item result from SharePoint Library

The following filter formula is returning a error yet it is returning 1 result which is correct, but I still need it to return other results which comply to the parameters within the filter formula.

What am I missing here?

 

Items Formula for Gallery:

Filter('IT Ticket Attachments', 'Ticket_ID' = DataCardValue23.Text)

 

See images below:

 

Data from 'IT Ticketing System' Source showing text value 236 for DataCardValue23 within our Form.

Capture.PNG

 

Library Settings in SharePoint showing Ticket_ID Column(this is not a unique key).

Capture1.PNG

 

 

SharePoint Library showing 2 files with Ticket_ID = 236. 

Capture2.PNG

 

PowerApps Gallery Only showing Capture5, should be populating Capture5 AND Capture6 from our SharePoint Library.

Capture3.PNG

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@WarrenBelz  I finally got the results to show correctly in the gallery displaying all the appropriate items with some changes to formulas for the items in Gallery and both the Title and Image sections of the Gallery. Originally the formulas for those were set as Lookup()

 now they are set to: 

If(!IsBlank(Filter('IT Ticket Attachments', Ticket_ID = DataCardValue23.Text)),ThisItem.Name)

 

But for some odd reason that red X is still there.

 

Capture.PNG

 

 

 

View solution in original post

Hi @MattP13 ,

Could you please share a bit more about the "Ticket_ID" column in your 'IT Ticketing System' SP List? Is it a Text type column or a Number type column?

Do you add the Gallery2 inside the "Status" data card?

 

Based on the formula that you mentioned, I could not find any syntax error. Please consider remove the Gallery inside your "Status" field data card, then re-add a new Gallery inside it, set the Items property of the Gallery to following:

Filter('IT Ticket Attachments', Ticket_ID = Text(ThisItem.'Ticket ID'))

Within the new Gallery, set the Text property of the Label to following:

ThisItem.'File name with extension'

 

Also please consider remove the SP Library connection from your app, then re-add a new connection to the SP Library from your canvas app, then check if the issue is solved.

 

Also please consider take a try to turn on the "Formula-level error management" option within Advanced settings of App settings of your app, then re-load your app, check if the issue is fixed.

 

If the issue still exists, please consider move the Gallery out of the "Status" field data card, instead, put it on the Detail screen (at the bottom), then try above formula again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
WarrenBelz
Super User
Super User

Hi @MattP13 ,

You are correct in it being strange. When you click on the x error, what does it say the error is?

@WarrenBelz When clicking the red X I receive the following:

 

The requested operation is invalid. Server Response: IT Ticket Attachments failed: The query is not valid.

clientRequestID: 75580870-b3a2-4153-a4d9-ac8ebf555f2e serviceRequestid: 75580870-b3a2-4153-a4d9-ac8ebf555f2e

 @WarrenBelz   So I modified my filter formula and now when I click the formula field, I get a table preview of the results showing both the correct results yet the Gallery does not populate both and I still have the red X indicating the same error. See image below:

 

Capture4.PNG

@WarrenBelz  I finally got the results to show correctly in the gallery displaying all the appropriate items with some changes to formulas for the items in Gallery and both the Title and Image sections of the Gallery. Originally the formulas for those were set as Lookup()

 now they are set to: 

If(!IsBlank(Filter('IT Ticket Attachments', Ticket_ID = DataCardValue23.Text)),ThisItem.Name)

 

But for some odd reason that red X is still there.

 

Capture.PNG

 

 

 

Hi @MattP13 ,

That is a data connection error. Your syntax is valid. Have you tried refreshing the data source?

Hi @MattP13 ,

Could you please share a bit more about the "Ticket_ID" column in your 'IT Ticketing System' SP List? Is it a Text type column or a Number type column?

Do you add the Gallery2 inside the "Status" data card?

 

Based on the formula that you mentioned, I could not find any syntax error. Please consider remove the Gallery inside your "Status" field data card, then re-add a new Gallery inside it, set the Items property of the Gallery to following:

Filter('IT Ticket Attachments', Ticket_ID = Text(ThisItem.'Ticket ID'))

Within the new Gallery, set the Text property of the Label to following:

ThisItem.'File name with extension'

 

Also please consider remove the SP Library connection from your app, then re-add a new connection to the SP Library from your canvas app, then check if the issue is solved.

 

Also please consider take a try to turn on the "Formula-level error management" option within Advanced settings of App settings of your app, then re-load your app, check if the issue is fixed.

 

If the issue still exists, please consider move the Gallery out of the "Status" field data card, instead, put it on the Detail screen (at the bottom), then try above formula again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft  Opening the app today, the red X is no longer there indicating an error.

I will be monitoring through the course of the day to see if it populates again.

Hi @MattP13 ,

Have you solved your problem?

 

If you have solved your problem this time, or the solution I provided above is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

If you still have some issue with your scenario, please consider feel free to open a new thread in our community, and we would help you there.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft  I have monitored the changes I implemented and have had no issues come about.

Thank you @v-xida-msft and @WarrenBelz for all your help!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (5,207)