How to remove duplicate items

Certified Senior Developer

    How to remove values in this grid?

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer

    Hi,

    I see the data in the grid have different set of values in all rows associated with contract IDs.

    One is the row where the data from contract is there and other seems to be the resultant of some left outer joins which you have done to the tables which might be duplicating the rows .

    Union function will only work if both values in the two arrays are exactly same which in this case is not .

    I am not sure about your use case but you may need to rethink on the JOIN clause which is being used here . See if INNER JOIN is something which would work and would only fetch the common rows from the tables .

  • Yea, my recommendation would also be to accomplish this within Appian utilizing a!queryEntity(), and potentially a view on the DB side.  I would be interested to hear the Seniors use case for avoiding OOTB Appian functions by using this method. 

    Do you have direct access to the DB?  Since you are currently utilizing this convoluted work-around of a stored procedure to execute dynamic SQL, you can take the SQL that gets generated and run it against the DB directly to tune it there.

    Otherwise as mentioned here you will need to adjust your JOINs or WHERE clauses to remove values where those specific fields are blank.