Hi
I want to DISTINCT duplicate data like the attached image.I know that using recordtype of grouping it can be distinct data.As my requirement i want to distinct value columns and other columns.
How can I implement it?
Discussion posts and replies are publicly visible
More context is needed - are you talking about local data or are you talking about doing aggregation on a query?
If you're talking about de-duplicating local data, like an array, then the standard technique is to take your value that (may have) duplicates, and call union() on it, "unioning" it with itself. I almost always set up a separate expression rule, i.e. "GLBL_distinct()" that accepts an array and unions it internally, to avoid having to hardcode a union() call into my interface or rule (etc). This works fairly well for general use cases.
Mike Schmitt
I want to query data and DISTINCT if there are duplicate values in the query values.
There's no equivalent to "SELECT DISTINCT" from the Appian Query perspective. Your choices are pretty much limited to 2 ways of handling it - either after querying on the front side, or fix it on the DB side before it ever gets to query.
1) for the first, just query into a local variable then de-duplicate into a separate local variable. very easy.
2) for the second, you either sanitize your data as it goes into the DB (easy to do ahead of time, much harder to do after the duplicate data is already present); alternatively, you can set up a view that pre-de-duplicates the data, and you run your Appian queries from that view instead.
My question is what makes these rows unique? is it the Country or the code? Do you have data where a country has two codes and you would need those in two different rows?
Konduru Chaitanya
I want to know how to select DISTINCT in appian , so I created some test data plz don't mind about the data.
a!queryAggregation(aggregationColumns: {a!queryAggregationColumn(field: "distinctColumn",isGrouping: true),