In our existing Appian user accounts, we have duplicated users with the same emp

In our existing Appian user accounts, we have duplicated users with the same employeeID (set as customField1). I have to do housekeeping to deactivate the duplicated user accounts based on the duplicated employeeID. What is the best way to do it?

I have looked at intersection, union, wherecontains, contains, distinct... But I have no idea how to implement any of these function to achieve my objective. Any ideas?

Thanks!
...

OriginalPostID-79642

OriginalPostID-79642

  Discussion posts and replies are publicly visible

Parents
  • Will, you can create a series of rules which will detect whether your employeeID is duplicated. I can send you an application if you would like, but I will try to post as much here as possible:

    I have rule!checkIfIndexEqualToValue -- index(ri!textArray,ri!index,{})=ri!value

    textArray can be your array of employeeID's (perhaps it is an integer)

    I pass this in to another rule isValueDuplicated:

    =if(sum(tointeger(apply(rule!checkIfIndexEqualToValue,ldrop(append(enumerate(length(ri!textArray)),length(ri!textArray)),1),ri!textArray,ri!value)))>1,ri!value,{})

    This returns the value if it is duplicated or an empty set otherwise. Finally, this rule is passed to another rule:

    rule!whichItemsAreDuplicated: =apply(rule!isValueDuplicated,union(ri!textArray,ri!textArray),ri!textArray)

    Pass in your array of employeeId's and it indicates which ones are duplicated. This will give you the list which you can then go back and deactivate users with.
Reply
  • Will, you can create a series of rules which will detect whether your employeeID is duplicated. I can send you an application if you would like, but I will try to post as much here as possible:

    I have rule!checkIfIndexEqualToValue -- index(ri!textArray,ri!index,{})=ri!value

    textArray can be your array of employeeID's (perhaps it is an integer)

    I pass this in to another rule isValueDuplicated:

    =if(sum(tointeger(apply(rule!checkIfIndexEqualToValue,ldrop(append(enumerate(length(ri!textArray)),length(ri!textArray)),1),ri!textArray,ri!value)))>1,ri!value,{})

    This returns the value if it is duplicated or an empty set otherwise. Finally, this rule is passed to another rule:

    rule!whichItemsAreDuplicated: =apply(rule!isValueDuplicated,union(ri!textArray,ri!textArray),ri!textArray)

    Pass in your array of employeeId's and it indicates which ones are duplicated. This will give you the list which you can then go back and deactivate users with.
Children
No Data