How to count frequency of data in dataset

Hi ,

 

Do we have any function in appian which can count frequency of data in dataset.

Test Dataset -

             Column 1 Column 2 Column 3

 Row 1 -     A           B             C

 Row 2-      A           B             D

 Row 3 -     C           B             E

 Row 4-      C           A             F

 Row 5-      C           G             H

 

Here i want to put one validation that combination of row 1 and row 2 should not be same . For that i need one frequency function which can return frequency of data in Column A & Column B. Here we have A & B coming in two rows which should not like that.

 

Kindly help me if anyone knows this.

I need to put one validation rule which should check frequency of

  Discussion posts and replies are publicly visible

Parents
  • 1. Let's name the master data you have as coreData having 3 columns (col1,col2,col3)
    2. Create an expression rule named filterData which accepts input of cdt type of coreData (NO MULTIPLE)
    Code for the rule...
    if(
    rule!apn_isEmpty(ri!input),
    null,
    if(
    ri!input.col1=ri!input.col2,
    null,
    ri!input
    )
    )
    3. To use this rule you can use a!foreach but you need to filter out null from the output
    Code for the same...
    filter(
    fn!isnull,
    a!foreach(expression:rule!filerData, input:ri!coreData)
    )

    Above rule will return coreData without rows that you don't expect and it will also NOT have null values.
    You can use above output as source for todatasubset function and can show it in grid.

    Hope this will be helpful!
Reply
  • 1. Let's name the master data you have as coreData having 3 columns (col1,col2,col3)
    2. Create an expression rule named filterData which accepts input of cdt type of coreData (NO MULTIPLE)
    Code for the rule...
    if(
    rule!apn_isEmpty(ri!input),
    null,
    if(
    ri!input.col1=ri!input.col2,
    null,
    ri!input
    )
    )
    3. To use this rule you can use a!foreach but you need to filter out null from the output
    Code for the same...
    filter(
    fn!isnull,
    a!foreach(expression:rule!filerData, input:ri!coreData)
    )

    Above rule will return coreData without rows that you don't expect and it will also NOT have null values.
    You can use above output as source for todatasubset function and can show it in grid.

    Hope this will be helpful!
Children
No Data