I'm trying to remove duplicate values in an Array. There is a lot of
online assistance, but not sure of the version of ECMAscript that the
workflow is utilizing. Anybody know?

Any examples of removing duplicate values?


SCENARIO:[/B] --- (LENGTHY DESCRIPTION, SORRY FOR BEING WORDY)
I'M USING COMPLEX MATCHING ON THE MATCHING POLICY TO FIND DUPLICATE
USERS THAT DON'T VALIDATE FOR AN OFFICIAL AUTHORIZED MATCH.
AS WE HAVE MANY DIFFERENT SEARCHES WE ARE PULLING EACH SEARCH INTO A
SERIALIZED STRING FROM A NODESET QUERY RESULT. WE ARE THEN PARSING THEM
TO HAVE A # SIGN IN BETWEEN EACH DN. WE THEN CONCATENATE ALL OF THE
SEARCH STRINGS INTO ONE. SO WE HAVE SOMETHING LIKE:
#CN=TIM.OU=USERS.O=DATA#CN=FRED.OU=USERS.O=DATA#. IT MAY BE COMMA
DELIMITED, BUT REGARDLESS THE CODE IS WORKING TO PARSE THE DATA AND THEN
DISPLAY THE MATCHES, HOWEVER WE HAVE MULTIPLE MATCHES FROM THE VARIOUS
QUERIES WE ARE DOING. I DON'T KNOW OF A GOOD WAY TO DO AN XPATH OR REGEX
TO STRIP OUT DUPLICATE VALUES FROM A CONCATENATED STRING, OR EVEN A NODE
SET, FIGURED IT WOULD BE EASIER TO STRIP IT FROM AN ARRAY AS PART OF A
WORKFLOW.... BUILDING ALL OF THIS INTO A WORKFLOW ANYWAY AS THERE IS A
POSSIBLE DUPLICATE USER THAT NEEDS HUMAN INTERVENTION.


[B]CODE EXAMPLE SO FAR, OF DISPLAYING THE DATA IN THE WORKFLOW:

function buildMatches() {
var v=new java.util.Vector();
var matches = flowdata.get('Start/request_form/OUSuspenseError');
var arrMatches = matches.split("#");

for(var i=1; arrMatches.length > i; i++) {
var a = arrMatches[i];
var n = a.length;
if (n > 3 ) {
var b = (a + ",ou=users,o=data");
arrMatches[i] = b;
}
v.add(arrMatches[i]);
}
return v;
}

buildMatches();



The above code is working, but contains duplicates, looking for code
examples to remove the duplicates. So far everything I have tried from
online examples don't seem to be working.

Thoughts?


--
fp_IDMWORKS
------------------------------------------------------------------------
fp_IDMWORKS's Profile: https://forums.netiq.com/member.php?userid=9869
View this thread: https://forums.netiq.com/showthread.php?t=57142