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

Community site session details

Session Id : sJ49I9u11cpE+mxRpLz2Dc
Power Apps - Building Power Apps
Answered

The requested operation is invalid. Server Response: The query is not valid

Like (0) ShareShare
ReportReport
Posted on 27 Sep 2019 13:28:19 by 34

I seem to be having an odd error with a Powerapps gallery. The gallery is based on a Sharepoint list and filters the list for the gallery on the basis of 3 Dropdown box values (Consultant, Site and User) and a toggle switch (Show/Hide Completed Items). As each of the Dropdowns also have an 'All' option, I have used the formula below. The switch sets a variable to true to filter the list by completed items.

Filter(TaskCalendar, 
 drpConsultantFilter_2.SelectedText.Result = "All Consultants" Or drpConsultantFilter_2.SelectedText.Result = Consultant,
 drpSiteFilter_2.SelectedText.Result = "All Sites" Or drpSiteFilter_2.SelectedText.Result = Site,
 drpUserFilter_2.SelectedText.Result = "All Users" Or drpUserFilter_2.SelectedText.Result = 'Assigned To',
 ShowCompleteVar Or 'Date Received'=Blank())

The odd thing is that the filter seems to work exactly as designed, but I whenever the app is run I get the error "The requested operation is invalid. Server Response: The query is not valid." 

Seeing as it seems to be working OK, is this safe to conclude this is a false positive or am I overlooking something?

 

Thanks

 

Categories:
  • Verified answer
    DaveNicholls Profile Picture
    34 on 11 Oct 2019 at 10:48:23
    Re: The requested operation is invalid. Server Response: The query is not valid

     

    Solution eventually worked out as below. 

    Thanks to Sik for putting me on the right track!

     Filter(TaskCalendar,
    Or(drpConsultantFilter_2.SelectedText.Result = "All Consultants",Consultant = drpConsultantFilter_2.SelectedText.Result),
    Or(drpSiteFilter_2.SelectedText.Result = "All Sites",Site = drpSiteFilter_2.SelectedText.Result),
    Or(drpUserFilter_2.SelectedText.Result = "All Users",'Assigned To' = drpUserFilter_2.SelectedText.Result),
    Or(ShowCompleteVar,'Date Received'=Blank()))

     

     

  • DaveNicholls Profile Picture
    34 on 04 Oct 2019 at 14:32:21
    Re: The requested operation is invalid. Server Response: The query is not valid

    Thanks Sik,

    That was the simplest solution, and it has cleared everything up! I got the idea for the filter formula from a post somewhere and thought it was odd that the column was to the right of the '=', but didn't question it.

     

    Thanks for your help.

     

    [edit] Unfortunately the solution didnt actually work eventually, the error happened again. Eventual solution worked out and shown below

  • v-siky-msft Profile Picture
    on 30 Sep 2019 at 08:18:46
    Re: The requested operation is invalid. Server Response: The query is not valid

    Hi @DaveNicholls ,

     

    There is something wrong with your logical test part of your filter function. it should deal with field, therefore, the field name must be the left of equals.

    so please modify your formulas as follow:

    Filter(TaskCalendar, 
     drpConsultantFilter_2.SelectedText.Result = "All Consultants" Or Consultant = drpConsultantFilter_2.SelectedText.Result,
     drpSiteFilter_2.SelectedText.Result = "All Sites" Or Site = drpSiteFilter_2.SelectedText.Result,
     drpUserFilter_2.SelectedText.Result = "All Users" Or 'Assigned To' = drpUserFilter_2.SelectedText.Result,
     ShowCompleteVar Or 'Date Received'=Blank())

    Best regards,

    Sik 

  • yashag2255 Profile Picture
    24,647 Super User 2024 Season 1 on 27 Sep 2019 at 13:55:00
    Re: The requested operation is invalid. Server Response: The query is not valid

    Hi @DaveNicholls 

     

    Can you try to update your expression as:
     
    Filter(TaskCalendar,
     If(drpConsultantFilter_2.SelectedText.Result = "All Consultants",true, Consultant = drpConsultantFilter_2.SelectedText.Result),
     If(drpSiteFilter_2.SelectedText.Result = "All Sites",true, Site = drpSiteFilter_2.SelectedText.Result),
     If(drpUserFilter_2.SelectedText.Result = "All Users" , true, 'Assigned To' = drpUserFilter_2.SelectedText.Result),
     Or(ShowCompleteVar,IsBlank('Date Received')))
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete