Hi Team,
Can anyone please help me how can I implement the case given below in interface using grid:
It should display the count of col A for each category. Any other suggestions might be helpful.
Discussion posts and replies are publicly visible
Create a rule using Query Aggregation to get the count of each column. Then use the rule as data source for readonly grid
Okay, But how to insert Total after each set of rows. If possible could you please explain more and share the code snippet, it would be really helpful.
puh, this goes deep and needs a lot of explaination.you need a query rule regarding aggregation:see here:https://docs.appian.com/suite/help/21.4/Appian_Data_Types.html#queryhttps://docs.appian.com/suite/help/21.4/fnc_system_a_query.htmlhttps://docs.appian.com/suite/help/21.4/Appian_Data_Types.html#aggregationhttps://docs.appian.com/suite/help/21.4/fnc_system_a_queryaggregationcolumn.htmlsecond: you need to fill your grid with the suitable query result.Informations about gridfields.docs.appian.com/.../Paging_Grid_Component.html
Hi Shubham,
I agree with others, you can create an internal CDT (not mapped to any table) with the required fields.
Create an expression rule and map you required data using two variables - one retrieving the data (a and b) and the other retrieving the aggregate data (Total a, Total b).
Then map your required data in the internal CDT with a!forEach()
In the interface map a local variable with the Expression Rule and use this local variable as data in grid.
Regards,
Farnaz