I am trying to order the Groups used in a query.
I have a Query that selects all entries from a BO. I then use the Grouping function to group the entries into groups made from a field called Period which contains a calculated value eg " July 2019". there is also another attribute which contains a number for the month "7". I then want to order the displayed groups in year and month order. Ordering within the groups is easy but I cannot figure out how to order the actual groups . eg I have record that have Period Jan 2019, Feb 2019, April 2019, July 2019, July 2019 etc
The groups when displayed show as:
April 2019
Feb 2019
Jan 2019
July 2019
June 2018
I want to order them as
June 2018
Jan 2019
Feb 2019
April 2019
July 2019
Is this possible by using groups or do I need to do something else?
Ordering Query Groups
Re: Ordering Query Groups
You can change the order of groups by adding:
FIND ...... ORDER BY [Group Attribute] ASC, [Attribute to sort within group] ASC
It looks like your groups are sorted alphabetically, that's probably the issue.
I think you need to change the calculated attribute type to 'Date', that should resolve your issue. (see image)
FIND ...... ORDER BY [Group Attribute] ASC, [Attribute to sort within group] ASC
It looks like your groups are sorted alphabetically, that's probably the issue.
I think you need to change the calculated attribute type to 'Date', that should resolve your issue. (see image)
- Attachments
-
- CalcType.PNG (3.19 KiB) Viewed 3367 times