Skip to main content
Nintex Community Menu Bar

Replace everything before or just get login id?

  • Jul 11, 2017 8:22 PM UTC
  • 5 replies
  • 22 views
  • Translate All

Forum|alt.badge.img+8

Userprofile  function on a form returns something like

DOMAINLoginID123

I would to get just the login id part put nothing seems to be working for me.

I tried:

replace(userProfileLookup(ctrlRequestor,"AccountName"),"^[^\]*\","")

and

replace(userProfileLookup(ctrlRequestor,"AccountName"),"^[^]*"

5 replies

Forum|alt.badge.img+14
  • Scholar
  • Jul 12, 2017 12:15 AM UTC

yes, with a slash it's little tricky laugh.png

try following

replace(userProfileLookup(ctrlRequestor,"AccountName"),"^[^\\]*\\","")‍
Translate

Forum|alt.badge.img+8
  • Author
  • Jul 12, 2017 12:00 PM UTC

Thanks!    Why are 4 slashes required?   I understand why 2 would be needed.   But 4?

Translate

Forum|alt.badge.img+8
  • Author
  • Jul 12, 2017 12:01 PM UTC

This is actually  easier and it works.   No replace needed.

userProfileLookup(ctrlRequestor,"UserName")

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jul 12, 2017 6:47 PM UTC

since special meaning of backslash needs to be escaped twice - once for javascript and second time for regular expression

Translate

Forum|alt.badge.img+3

Hi Bruce,

I have to extract the login ids in a workflow. For Example I have two login ids separated by comma in a variable (DOMAINLoginID123,DOMAINLoginID123).  I know how to extract single login id using the action regular expression in workflow. But I am unable to extract the two login ids. I tried using action 'for each' but its returning an error. 

Any advice is really appreciated.

Thanks in advance!!

Translate