cancel
Showing results for 
Search instead for 
Did you mean: 
landrybe
Nintex Newbie

Regular Expression Extract Username from DN

Jump to solution

I'm trying to find the manager of a task assignee. When I use Query LDAP to find the manager, it returns the distinguished name of the manager. We need to forward the task to the assignee's manager once the assignee completes the task. I thought pulling the username from the LDAP return:

CN=<manager name> (<manager username>),OU=<OU>,OU=<OU>,OU=<OU>,DC=<DC>,DC=<DC>, would be the best way to go. I then could use that username to create a new task for the manager. I'm trying to get a grasp of regular expressions but it's been really confusing to me. Can someone assist in the right expression to use? Or if there's a better way to pull the manager of the task assignee that's just as good.

*Note: The user initiating the workflow is not the assignee.

Thanks!

Tags (1)
0 Kudos
Reply
14 Replies
Automation Master
Automation Master

Re: Regular Expression Extract Username from DN

Jump to solution

assuming angle brackets are not part of manager's name and round brackets enclose only manager's name, following regex should work for you

(?<=\()[\w\s]+(?=\))
0 Kudos
Reply
landrybe
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

That seemed to work, thanks for your quick response!

Beau Landry

Content Management Application Administrator

Continental Resources, Inc.

20 N. Broadway

OKC, OK 73102

P/F: 405.774.5963

C: 405.435.0584

Beau.landry@clr.com<mailto:Beau.landry@clr.com>

www.clr.com<http://www.clr.com/>

Mailing:

P.O. Box 269000

OKC, OK 73126

0 Kudos
Reply
landrybe
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

One other question, could you possibly break this expression down so I know why it worked?

Beau Landry

Content Management Application Administrator

Continental Resources, Inc.

20 N. Broadway

OKC, OK 73102

P/F: 405.774.5963

C: 405.435.0584

Beau.landry@clr.com<mailto:Beau.landry@clr.com>

www.clr.com<http://www.clr.com/>

Mailing:

P.O. Box 269000

OKC, OK 73126

0 Kudos
Reply
landrybe
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

So come to find out, not all of our accounts have the username in the DN. That is something new they just started adding in AD. Is there a different way to pull the task assignee’s manager username or email address so we can create a task for them as well? Thanks again.

Beau Landry

Content Management Application Administrator

Continental Resources, Inc.

20 N. Broadway

OKC, OK 73102

P/F: 405.774.5963

C: 405.435.0584

Beau.landry@clr.com<mailto:Beau.landry@clr.com>

www.clr.com<http://www.clr.com/>

Mailing:

P.O. Box 269000

OKC, OK 73126

0 Kudos
Reply
eiben
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

Well, if your AD has the manager property correctly filled and UPS is setup you could use the query user profile action to query the UPS for a user's manager.

If you want the manager of the current person, there should already be a workflow context property for the manager.

0 Kudos
Reply
landrybe
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

Thanks for your response. I’m unable to use the manager context property because the person initiating the workflow is not the same person that’s getting assigned the task.

I meant to add we do not have the Enterprise edition, so we do not have the “query user profile” action available to us.

Beau Landry

Content Management Application Administrator

Continental Resources, Inc.

20 N. Broadway

OKC, OK 73102

P/F: 405.774.5963

C: 405.435.0584

Beau.landry@clr.com<mailto:Beau.landry@clr.com>

www.clr.com<http://www.clr.com/>

Mailing:

P.O. Box 269000

OKC, OK 73126

0 Kudos
Reply
Automation Master
Automation Master

Re: Regular Expression Extract Username from DN

Jump to solution

You may want to post a new question with this in it, as it's a bit different from the title on this one! You'll probably get more responses.

0 Kudos
Reply
eiben
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

But do you have the manager property filled in AD?

0 Kudos
Reply
landrybe
Nintex Newbie

Re: Regular Expression Extract Username from DN

Jump to solution

I’m starting a new discussion on this now.

We do have the manager property populated. The problem is when I query LDAP in Nintex WF, it pulls the DN. I need to be able to pull the manager’s username or email in order to create a task for them after their direct report completes his/her task.

Beau Landry

Content Management Application Administrator

Continental Resources, Inc.

20 N. Broadway

OKC, OK 73102

P/F: 405.774.5963

C: 405.435.0584

Beau.landry@clr.com<mailto:Beau.landry@clr.com>

www.clr.com<http://www.clr.com/>

Mailing:

P.O. Box 269000

OKC, OK 73126

0 Kudos
Reply