Skip to main content
January 29, 2025
Question

Query the Data using CreatedOn fileds using Grouping

  • January 29, 2025
  • 9 replies
  • 0 views

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
January 29, 2025

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

konduruc733182
January 29, 2025
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

January 30, 2025

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

konduruc733182
January 30, 2025
how about week and quarters

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

amaans4178
January 30, 2025

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
January 30, 2025

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