cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Date Sort

Hi,

 

I have a Sharepoint List named Property Information that has Dates in a column labelled 'Electric Due Dates'.  The list currently sorts alphabetically so I've added a Label named 'Date Sort' which I'd like to sort the dates into order so I've used the following formula which isn't working 😞

 

 
 

Sort(Filter('Property Information', Text('Electric Due Date',"[$-en-US]mm/dd/yyyy") = Text(Today(),"[$-en-US]mm/dd/yyyy")), 'Electric Due Date',Ascending)

 

I've not formula errors but i have 2 warnings :

 

 

Issue; Delegation warning.  The "Filter" part of this formula might not work correctly on large data sets.

 

The data source might not be able to process the formula and might return an incomplete data set.

Your application might not return correct results or behave correctly if the data set is incomplete.

 

Location:  Label5.OnSelect

 

How to fix:

1. If you data set exceeds the 500 record limit but contains less than 2,000 records, try resetting the limit.

2. Try simplifying the formula

3. Try moving your data to a different data source.

 

I can confirm i only have around 80 lines in the SharePoint so don't think the exceed limit is a problem?

 

Any advice pretty please?

 

Thanks

 

Marie

 

14 REPLIES 14
Highlighted
Super User
Super User

Re: Date Sort

@MarieBainbridge
No need to worry about delegation here is your list will never exceed 2,000 records.

For your next question on how to sort: what is your datasource and what column type (if SharePoint)? From what I understand your dates sort alphabetically but you want oldest to newest.

Does this part of the formula work on its own already?
Filter('Property Information', Text('Electric Due Date',"[$-en-US]mm/dd/yyyy") = Text(Today(),"[$-en-US]mm/dd/yyyy))

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Date Sort

Hi there,

 

The formula seems to have no issues as it has no red flags; the date element must be okay?  but if i use the one you've provided it gets red flags?  Yeah, it's a Sharepoint list too.

 

Thanks

 

Marie

Highlighted
Super User
Super User

Re: Date Sort

@MarieBainbridge 

I was working on my iPhone and copied it with a missing character.  Does this FILTER show the correct results?  If yes, we will workon sorting next.  The best way to solve formula issues to go from the inside to the outside.

 

Filter('Property Information', Text('Electric Due Date',"[$-en-US]mm/dd/yyyy") = Text(Today(),"[$-en-US]mm/dd/yyyy"))

 

What type of column is Electric Due Date in SharePoint?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: Date Sort

No worries; it's a Date Only format column...

Highlighted
Super User
Super User

Re: Date Sort

@MarieBainbridge 

Does the FILTER code work?  If yes, what does it display?  Screenshots are always appreciated...

Highlighted
Frequent Visitor

Re: Date Sort

Capture a.JPGAny good ? 

Highlighted
Super User
Super User

Re: Date Sort

@MarieBainbridge 

To me it looks like you have put this code in the OnSelect property of a button.  It cannot go there.

 

What are you trying to do with these dates in your app?  Please explain in detail.

 

Highlighted
Frequent Visitor

Re: Date Sort

Oh?  Sorry, I'm just wanting to create a button/label to select that puts the items on the List in Date order?

Highlighted
Super User
Super User

Re: Date Sort

@MarieBainbridge 

I'm sorry I do not see any list.  What list are you referring to?  It might be a good idea to take a screenshot of your app to give an idea of how it should work.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (13,964)