Skip to main content
New Participant
Jan 29, 2025 5:18 PM UTC
Question

Query the Data using CreatedOn fileds using Grouping

I have some data in my DB in that one filed named "CreatedOn"(2025-11-20 06:00:44.470000)

i need to group the details by CreatedOn 

i need to group data by current year ,current quarter, current month, current week and  want to sum a field called "EMI"
Using a!quereyRecordType() | this will be in a rule
i want to hit this rule only once to get all of this data in a stretch 

How to achieve it

9 replies

stefanhelzle0001
Brainy
Jan 29, 2025 5:48 PM UTC

Did you try to use the query editor in an expression rule using a!queryRecordType()?

konduruc733182
Inspiring
Jan 29, 2025 7:10 PM UTC
i want to hit this rule only once to get all of this data in a stretch 

For this to happen you would need to write down the query. As Stefan mentioned you can try using the query editor in the expression rule.

Under the query editor you will have aggregate records option and once you click you can chose on what fields and criteria you would want to aggregate.

docs.appian.com/.../query-editor.html

New Participant
Jan 30, 2025 5:42 AM UTC

I tried in Query Edited i got it for month and year how about week and quarters

konduruc733182
Inspiring
Jan 30, 2025 6:13 AM UTC
how about week and quarters

I would recommend creating custom record fields and using these values for grouping

amaans4178
Brainy
Jan 30, 2025 4:50 AM UTC

When the Field type is of type Date,Date and Time or Time, we can use the Interval parameter of a!grouping function, in which we can provide values such as "YEAR","MONTH_TEXT" and etc to group the data based on desired interval.

a!grouping function goes in the a!aggregationFields function.

jayaprakashr0001
Participating Frequently
Jan 30, 2025 5:19 AM UTC

use the aggregations to group the records using the queryRecordType()