Skip to main content
November 26, 2021
Question

How to implement it in interface using grid?

  • November 26, 2021
  • 4 replies
  • 0 views

Hi Team,

Can anyone please help me how can I implement the case given below in interface using grid:

Col A Count Col B
a 1
a 2
a 1
Total a 4
b 1
b 2
Total b 3

It should display the count of col A for each category. Any other suggestions might be helpful. 

    4 replies

    tanvirs0003
    Inspiring
    November 26, 2021

    Create a rule using Query Aggregation to get the count of each column. Then use the rule as data source for readonly grid

    November 26, 2021

    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.

    richardm900458
    November 29, 2021
    November 30, 2021

    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