cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DaveNicholls
Level: Powered On

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

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
DaveNicholls
Level: Powered On

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()))

 

 

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

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!
v-siky-msft
Level 10

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 

DaveNicholls
Level: Powered On

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

DaveNicholls
Level: Powered On

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()))

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,491)