Tuesday, July 2, 2013

Nintex: Replace part of a string

Nintex Workflow Objective:
Strip off the extra characters and the domain name from the results of a people picker (in a SharePoint list) to get just the user ID in order to query LDAP for another part of my workflow.

Note: SharePoint 2013 adds a set of characters to the beginning of a user ID when you display the ID:


The good news is that these are not random characters.   We just need to remove them with a Nintex function.

NOTE: There is a great article about what these characters mean: (They basically describe the type of claim and where it comes from.)

Choose the Build String (Insert -> Operations -> Build String) and use the fn-replace to strip off the extra characters.  The function looks like this:

  • Item property is the reference to a column in the SharePoint list.  It is a people picker from the list.
  • A comma.  Then the text you would like to have replaced.  (This is case sensitive.) 
  • Then, another comma.  After this second comma, write the text you would like to appear instead of the replaced text.  In my case, this is nothing, so I close the expression.
  • Store the result in a text variable you have created. My variable is named userID.
It looks like this in Nintex:

No comments:

Post a Comment