Workflow Soluiton

 View Only
  • 1.  The ADUserInfo object and Test Collection for Duplicates - problems

    Posted Jun 07, 2010 11:03 AM
    I've tried this a couple of different ways, but I can't seem to get rid of duplicate objects in a collection of ADUserInfo objects.

    As a background, I am looking at AD groups that have access to a particular folder.  I'm then using the For Each Item in Collection component to go through each of those AD groups and add ADUserInfo objects into a collection.  (Note that some users are members of 2 groups that have access).

    Once I have that big list of users, I try to run that collection through the Test Collection for Duplicates component, but that component always returns false like there are no duplicates, instead of true and dumping the distinct values list to another variable.

    I've even tried re-creating the logic that component most likely uses by doing another For Each Element in Collection component then using the "Item Is In Collection" component to check for duplicates that way..  ie. first pass it adds John Doe to the empty collection; second pass it should see John Doe in the collection and not add him again.  Unfortunately, it does add him again.

    Am I doing something wrong?  Is there something unique between these ADUserInfo components even though they're duplicates?


  • 2.  RE: The ADUserInfo object and Test Collection for Duplicates - problems

    Posted Jun 07, 2010 12:01 PM
    I believe what’s failing is the compare logic workflow is using for both the Test Collection for Duplicates and the Item is in collection components.  If I remember from past projects, with complex data types Workflow is simply comparing the key field and not the entire record (haven't tested this recently).

    I think your best bet is to use the Test Collection for Duplicates component, then on the model tab create a custom comparison that will check on what you know for your AD setup to be a unique field.   For example, have it compare just the User ID field, as long as you know that is consistent throughout your AD environment.


  • 3.  RE: The ADUserInfo object and Test Collection for Duplicates - problems

    Posted Jun 07, 2010 01:15 PM
    How should the model look?  I thought about that when I saw it but when I opened up the model builder I wasn't sure what components to stick in there or how everything should be linked.