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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,946)