Hello, I'm currently building an audit history for my job. The way our client wants the history displayed is grouped by the date that the history action is created on. So that the list sometimes displays 1 action per timestamp and sometimes 2 or 3 actions by timestamp. We have found a way to do this but it is complicated. I get all the values in the histActionOn, then I uses union() to get only the unique values. From this point I can do more complex indexing to organize all the actions by date, or I can throw a a!queryRecordType() in a for loop and filter it by the histActionOn field. This gets exactly what I need. A record list with actions separated by date and time, but it's incredibly inefficient as it puts a query in a for loop. I'm sure there's a way to group all the actions by unique dates, but I don't know a way at this point. Any thoughts?Thank you
Jason
Discussion posts and replies are publicly visible
Did you consider using a custom record field to extract just the date and then aggregate on that?
I thought aggregation could only be done on charts and graphs.
a!queryRecordType supports all the features.
so the problem there is that it grabs all the dates, and doesn't eliminate duplicate dates. I'm sure I'm missing another step, but I ended up querying the record type, grabbing the date field I wanted in local variable. I then applied union() to it to get all the unique dates. After that I ran the unique dates as the items in a for loop, and then created another local variable where I indexed the record query based on each unique date. this got me all the record entries based on the unique dates.
OK. There is even a design pattern in the interface designer that implements this. It is the "Event Timeline".
Keep in mind to not load too much data and implement paging and search to allow navigation.
https://appian.rocks/2023/07/24/universal-paging/