web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Invalid-usage-of-the-o...
Power Apps
Unanswered

Invalid-usage-of-the-option-NEXT-in-the-FETCH-stat in powerapps filter

(0) ShareShare
ReportReport
Posted on by 608

Invalid-usage-of-the-option-NEXT-in-the-FETCH-statement, in correct syntax near <

 

I am getting above error in powerapps filter gallery, the same filter is working fine when done on button click.

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi AmitLoh,

     

    Could you provide more details?
    1. What’s the data source?
    2. How did you configure the function to filter the Gallery? Could you show me the codes?

     

    Please check this document about Filter function to see more details about Filter:
    https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/


    Best regards,
    Mabel Mao

  • AmitLoh-Powerap Profile Picture
    608 on at

    Filter(Sort(ourdatasource, RecordId, Ascending),  (ProductGroup=TextInputsearch.Text || LocalProductName=TextInputsearch.Text || GenericName=TextInputsearch.Text || Region1=TextInputsearch.Text || WHOATCCode=TextInputsearch.Text || TherapeuticAreas=TextInputsearch.Text || Indication=TextInputsearch.Text || Description = TextInputsearch.Text || Company = TextInputsearch.Text)))

     

    Now same filter works on button click but on gallery Items if I put same filter it gives me this weird error.

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi AmitLoh,

     

    What are the column types?


    I guess there might be some column types that are not supported in the filter function.
    Please try to enter Formula1 [,Formula2,…] one by one to see which one is invalid.
    Filter( Table, Formula1 [, Formula2, ... ] )

     

    I tried with the similar filter function on my side, it can filter with no error. I set the Items property of the Gallery looks like below:
    Filter(Sort(listF,ID,Ascending),(Title=TextSearchBox1.Text || q7kf=TextSearchBox1.Text ||g87p=TextSearchBox1.Text))


    Best regards,
    Mabel Mao

  • ManishM Profile Picture
    Microsoft Employee on at

     am getting the same error. Any update on this?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard