Jump to content
Server Maintenance This Week. ×

sort by current year vs all others


This topic is 2673 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a date field and I'm currently sorting all of my records by year is 2016 then 2015 then 2014 then etc etc.

I would like to sort this by current year i.e. 2016) then all other records 2015, 2014, 2013 together.

What is the best way to accomplish this?

 

Thanks

 

Link to comment
Share on other sites

my table is currently sorted with: year (get(currentdate)) so every section breaks down my accounts by year (2016, then 2015 then 2014) So I'm trying to have 2 sections in my table, the top section is all current year accounts, the next section is all other accounts 2015-2000 all lumped together (not in sections)

Link to comment
Share on other sites

15 minutes ago, wattmhite said:

I'm trying to have 2 sections in my table, the top section is all current year accounts, the next section is all other accounts

If you're talking about sections, then you're talking about more than just sorting. To enable such grouping, define an unstored calculation field (result is Number) =

Year ( YourDateField ) = Year ( Get ( CurrentDate ) ) 

then sort and group by this field.

 

14 minutes ago, wattmhite said:

my table is currently sorted with: year (get(currentdate)) so every section breaks down my accounts by year (2016, then 2015 then 2014)

No, that's not possible: Year ( Get ( CurrentDate ) ) returns the same value for every record, so sorting by it is meaningless.

 

 

Link to comment
Share on other sites

You could view your records through a portal that you filter.

You could have a popup menu (chooser) that you set for current year/all previous years. Then on the portal you can filter based on your choice, and show either where:

Year ( YourDateField ) = Year ( Get ( CurrentDate ) ) 

or

Year ( YourDateField ) > Year ( Get ( CurrentDate ) ) 
Link to comment
Share on other sites

This topic is 2673 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.