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
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()))
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
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
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2