cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marlin-A
Helper V
Helper V

date filter problem

Hello,

 

I am confuse why can't I filter my new entry with date.

I have this app which can filter the date when it was submitted.

but then when I click on the day I want to filter it goes nothing or sometimes the oldest entry is showing.

 

Sort(
   Search(
      If(
         varday>0,
         Filter(
            'WFH-Reporting',
            Weekday(SubmissionDate)=varday,
            Member_Email = Email.Text
         ),
         Filter(
         'WFH-Reporting',
        Member_Email = Email.Text
        )
      ),
      TextSearchBox1.Text,
      "Member_Name",
      "Client"
   ),
   
   Created,
   Descending
)

 

Eyes.pngFormula.PNG

 

is it a just a bug? but I tested out this code in my other app it works well.

 

Thank you!

16 REPLIES 16

Hello @WarrenBelz ,

 

I tried again the collection thing, when I check my collection it has an items for it a preview of 5 entries, but when I use that as a source to filter my gallery still no items display... 

 

Thank you

Hello @v-xida-msft ,

 

That's what I did, but it seems like the delegation is the problem in here, because I exceed the maximum of threshold on my sharepoint list. I have 5700+ items on my list, so I think the delegation is really the problem in here because of the large datasets I have.

 

Thank you!

Hi @Marlin-A ,

Currently, It is an known limit in SharePoint connector, Datetime column in SP list could not be delegated in Filter function. Please check the following article for more details:

https://docs.microsoft.com/en-us/connectors/sharepointonline/#power-apps-delegable-functions-and-ope...

 

As an fixed solution, you could consider bulk-load your SP List Items into a collection in your app, then use the collection as data source in your app instead of original SP List.

 

Please check and see if the following thread solution would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Loading-60-000-SharePoint-List-Items/m-p/448...

https://www.youtube.com/watch?v=2M0zCyu__20

http://rezadorrani.com/index.php/2019/09/18/powerapps-delegation-with-sharepoint-as-a-data-source-wi...

 

After that, you could use the stored Collection table as data source in your Filter formula as below:

Sort(
   Search(
          Filter(
                 CollectionTable,
                 If(
                     varday > 0,
                     Weekday(SubmissionDate) = varday,
                     true
                 ),
                 Member_Email = Email.Text
         ),
         TextSearchBox1.Text,
         "Member_Name",
         "Client"
   ), 
   Created,
   Descending
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Marlin-A ,

Have you put labels in the gallery to show the field names - if you have items in the preview, they have to show in a gallery with the Items of the collection name.

Hi @Marlin-A ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hello @WarrenBelz,
Still got nothing from my research.

Can making the filter shows only a past week items can solve this delegation?

Hi @Marlin-A ,

Date filters are simply not Delegable. You can however collect the newest 2000 record with 

ClearCollect(
   colMyCollection,
   Sort(
      MySPListName,
      ID,
      Descending
   )
)

and then your date filters will work.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,046)