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

combined filter returns partial results

Hello,

 

I am starting to create an app connected to a Salesforce table. This is for a charity school and the idea is for teachers to take attendance during class with their mobile. My first screen allows to select the teacher (dropdown with a distinct function) and the class (a second dropdown with a distinct function as well as a filter function to display only the class the teacher is in charge of). So far so good.

My second creen has a date picker for the user to select the session and the gallery presenting the children in this class. This list needs to be filtered on the class and the session selected.

 

My formula is :

 

Sort (Filter([mydatabase], DatePicker1.SelectedDate=mysessioncolumn && ClassDrop.Selected.Value=myclasscolumn),
If(SortDescending1,SortOrder.Descending, SortOrder.Ascending))

 

It returns only partial results. I have the warning "part of this filter formula cannot be evaluated...". 

 

Any clue?

Thanks a lot!

 

 

 

7 REPLIES 7
Community Support Team
Community Support Team

Re: combined filter returns partial results

Hi SoniaM,

 

I have tested your formula on my side, it works properly. Do you know which part of the formula cannot be evaluated? By hovering your mouse on the formula, there would be a message shown.

 

>I created a similar SharePoint list as data source according to your description. Below is how the list is configured:

teacher1.PNG

 

>Then create a blank app, create a connection to this list.
>>On Screen1, add two drop down controls, then set its Items property as:
Drop down1: Distinct('teacher student',Teacher)
Drop down2: Filter('teacher student',Teacher=Dropdown1.Selected.Value)
Then add a button navigate to Screen2.

 

>>On Screen2, add a Date picker control, a button named as Sort, and a Gallery control:
Set the Onselect property of the Sort button as: UpdateContext( {SortDescending1: !SortDescending1} )
Set the Items property of the Gallery as:

Sort(Filter('teacherstudent',DatePicker1.SelectedDate=Session&&Dropdown2.Selected.Value=Class),If(SortDescending1,SortOrder.Descending, SortOrder.Ascending))

Then when I select the Teacher, Class, Date, then the students in this class would be shown.

teacher2.PNG

 

Hope my steps can be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
soniaM
Level: Powered On

Re: combined filter returns partial results

Hello

 

Thanks very much for your quick answer. I have followed the steps again and it doesnt work for me. I am connected to a Salesforce table and I have 5,000+ items in it. The problem seems to be a query delegation issue (it only caches to top 500 i read somewhere...)...as each kid has 30 items I end up with only the top 15/20 kids spread across 15 classes.

 

Do I have to write something to updatecontext and limit items to the selected criteria of the 2 dropdown somewhere ? or collect data temporarily? or sort?

 

(sorry cant work out how to add a pix...it says suggestion: part of this fileter formula cannot be evaluated remotedly due to service limitations. The kicak evaluation may produce suboptimalor partial results....

 

Thanks again for your help

 

Sonia

 

 

 

 

 

soniaM
Level: Powered On

Re: combined filter returns partial results

Hi again

 

I have studied your example and in fact the second dropdwon I need is not the student but the class. I have

Distinct(Filter(Attendance,Teacher__c=TeacherDrop.Selected.Value),Class_attended__c) it might be where things go wrong?

Community Support Team
Community Support Team

Re: combined filter returns partial results

Hi SoniaM,

 

Thanks for your reply. I test your formulas on my side, seems that there is nothing wrong with the formulas.
I got that you were using Salesforce table as a data source, and there are 5,000+ items in the table. But only 500 items are shown on the app.

 

I have seen a thread about data source 500 items limit for SharePoint list and 256 items for Access Web App table, below is the thread link:
https://powerusers.microsoft.com/t5/PowerApps-Forum/Data-source-500-item-limit-for-SP-list-and-256-i...

 

But it seems that there are still an limitation on the data source of both SharePoint list and Access Web App. I guess that there are also a similar limitation on Salesforce table data source, so only top 500 items are shown on the app.

 

In another thread, seems that PGs are working on SharePoint limitation, we just need more time and more patience to wait for this.
https://powerusers.microsoft.com/t5/PowerApps-Forum/Only-256-Entries-show-from-Sharepoint-list/m-p/1...

 

Please try to show the data in a Gallery control with no Filter formula to see how many items can be shown on the app. You could use a Countrows function to get the rows.

 

I will also report this limitation on Salesforce table, I will back once I got any updates. Thanks again for your feedback and patience. 

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
soniaM
Level: Powered On

Re: combined filter returns partial results

Hi

 

Ok.Thanks for this. I have also identified another issue related to the design of my Salesforce database. The field providing a date is a lookup and value sits in another table. This was preventing me from using the date as a filter. I have modified my original database and created another column as date field and that worked.

 

Thanks

 

Sonia

 

Community Support Team
Community Support Team

Re: combined filter returns partial results

Hi SoniaM,

 

So you make it done by adding a custom date column instead using the default date column, right?
I will involve someone who is familiar with this issue to take a further investigation on it.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
soniaM
Level: Powered On

Re: combined filter returns partial results

 

Hi,

 

I have captured the error message generated by the combined / cascading dropdown filter. I don't understand the message but maybe you do. Is it indeed related to the Max 500 or is it something else?

Thanks

Sonia

 

Screenshot 2017-01-17 00.09.25.png

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 150 members 5,127 guests
Please welcome our newest community members: