Skip to main content
mollyn6512
November 8, 2022
Question

Get unique record for an interface querying data from a view

  • November 8, 2022
  • 3 replies
  • 1 view

Hi everyone, I'm quite stuck at this part so I'm needing some helps [emoticon:6d505171faa4497c85c5ca27290c555d]

I built an interface to show a report which data is from a view, the view looks like this table below: 

Case Id Step  User doing this step Updated Date Time
1 Created Molly 11/11/2021 5:11
2 Processing John 11/9/2021 7:22
2 Pending John 11/3/2022 8:33
2 Completed Molly 11/2/2022 9:11
3 Created Nick 10/5/2022 13:20
4 Processing Nick 9/9/2022 9:09
4 Pending Molly 12/8/2021 6:12
4 Completed Molly 12/6/2021 6:12
4 Created Molly 22/10/2022  1:20

The interface does not show updatedDateTime + Step (business requirement), and was filtered by loginUser(), which is why I got this result of duplicating rows with same case ID and other columns all have the same values in the report for the same case. Is there anyway I can get the unique row using Appian if there are duplicating row in the interface? 

Case Id Created date Related case Related Advisor
1 11/11/2021 5:11 12 Davis
2 11/2/2022 9:11 15 Nick
4 12/8/2021 6:12 16 Molly
4 12/6/2021 6:12 16 Molly
4 22/10/2022  1:20 16 Molly

    3 replies

    November 8, 2022

    Hi mollyn6512

     Use union() function from where you are sourcing your data in the grid. Union will remove duplicates.
    use it like this -  union (local!data,local!data)

    mollyn6512
    November 8, 2022

    Thank you :D 

    csteward
    November 8, 2022

    Note with the union() function you will have to retrieve extra data into your interface before filtering it out, which is not scalable.  I would suggest utilizing Query Aggregation to group fields, which will eliminate duplicates from being returned altogether.