Select to view content in your preferred language

Connect: UNIQUE function

58
0
Tuesday
Status: Open
Labels (1)
AlfredBaldenweck
MVP Regular Contributor

I would love to get a UNIQUE function to work on 1) any list of things and 2) answers in multiselects across repeats.

For example #1: 

Granted, this is pretty niche, but I'm sure there are other applications: Solved: Cascading Multi-selects: Only showing unique choic... - Esri Community (Also it has to do with multiselects as well, but again, I'm sure there are other applications). 

 

For example #2:

I was working on a form that needed to get a cumulative review of many questions in a repeat. For Single-choices, it was a pretty simple ranking of the answers using nested ifs.

NameCalculation
finculvcaljoin("; ", ${culverts})
finculvif(count(${culverts})>0, if(contains(${finculvcal}, 'Major Issues (significant blockages or failure)'), 'Major Issues (significant blockages or failure)', if(contains(${finculvcal}, 'Moderate Issues (frequent blockages or partial failure)'), 'Moderate Issues (frequent blockages or partial failure)', if(contains(${finculvcal}, 'Minor Issues (some blockages, but manageable)'), 'Minor Issues (some blockages, but manageable)', if(contains(${finculvcal}, 'Clear (no blockages, functioning properly)'), 'Clear (no blockages, functioning properly)', if(contains(${finculvcal}, 'N/A'), 'N/A', ""))))), "")

For multiselects, it's a lot more complicated:

grossUniqueselectmult.gif

NAMECalculation
calcjoin("; ", ${culverts})
finculv0if(not(contains(${calc}, "Clear")) and not(contains(${calc}, "Minor")) and not(contains(${calc}, "Moderate")) and not(contains(${calc}, "Major")) and contains(${calc}, "N/A"), "N/A", "")
finculv1if(contains(${calc}, "Clear"), "Clear,", "")
finculv2if(contains(${calc}, "Minor"), "Minor,", "")
finculv3if(contains(${calc}, "Moderate"), "Moderate,", "")
finculv4if(contains(${calc}, "Major"), "Major,", "")
finculvconcat(${finculv0},${finculv1}, ${finculv2}, ${finculv3}, ${finculv4})

(For the record, all of these except for finculv were calculations bound to Null; they do not actually appear to the user).

It would have been SO MUCH easier to just unique(${culvert}).

Please add in a UNIQUE function.