Skip to main content

One of my workflow’s events gives users the capability to dynamically set a destination user from a group of users, and this group is stored as a choice field in a document set. The choices correspond to the first and last names – not the user names -- of users in Active Directory.  After a user makes a selection, the workflow retrieves the username corresponding to the full name selected, and sets the destination user based on the resulting username.  This all works great.  However, the users using this system now want the capability to select more than one user.  I know that I can go into “Destination Rule Options” and select “Plan per slot (no destinations)”,  select “Select a list field to determine how many slots should be created”, and then use a split function in the box below, providing the choice data for the text field (which is formatted as ;#Joe Smith;#John Jones;#) and ;# for the delimiter.  Now, how can I get the AD user name for each token?  Is this possible?  If I provide user names instead of full names, this wouldn't be an issue, but the users using this system would prefer to see the display names, not the user names.

Hi,

 

The URM Service provides methods for looking up a username from a display name. You will need to create a smartobject from the URM Service as it is not there by default, but you only need to do this once and then it is available to all your workflows. Once you have created the smartobject off the URM Service proceed to modify your workflow as below.

 

I would create an activity before the one where you are assigning the destinations and in this activity use plan per slot - no destination and have it split your names out. This will effectively create a unique slot for each user display name. Assign the slot data as the name being returned from the split, this name will then be saved into the Instance Data for the Activity Destination Instance.

 

Create a new process data field which will store the usernames in a delimited format and also create a data field on the activity level which you can use to temporarily store the username after retrieving it from the URM Service.

Create a data event in the activity. Call the URM Service's Get Users method, passing in the ActInstDest InstanceData to the Display Name property as an input. Also supplly the label name which should be K2. Have the result saved to your activity-level data field.

Next create another data method underneath this one which will take the newly populated username and add it to the process-level data field (concatenate it).

This will add the newly found username to the process data field by concatenating the current value of the process data field with the newly found username. Use the Concatenate inline function or an expression for this.

 

Now during runtime the users will be split out and their usernames retrieved, saved back to another data field which you can now use in your actual activity containing the client event. Call the split function on the list of usernames and assign your destinations using plan all at once.

 

This was fairly technical and I hope I explained it well enough.

Let me know if anything is unclear.

 

Regards,

JohanL


Reply