cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Value of common 'Current User' in JavaScript

Jump to solution

When I execute the following Custom JavaScript in Nintex Forms I get an unexpected result...

     NWF.FormFiller.Events.RegisterAfterReady( function() { console.log( 'Current User' ); } );

I would expect the result to be something like...
    i:0#.w|myDomain\myUserId
But instead I get back...
    i:0#.w|myDomainM77
What is "M77" and how can I translate this into an identifiable user value?  Thanks.

Labels: (2)
Tags (2)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Value of common 'Current User' in JavaScript

Jump to solution

likely backslash and first character from user account is interpreted as a special escaped character (eg \n => new line) by javascript

I'd suggest to let evaluate CurrentUser reference by a caclulated value control and then in javascript reference calculated value control. it should handle backslashes correctly.

Reply
Workflow Hero

Re: Value of common 'Current User' in JavaScript

Jump to solution

That works - thanks! 

Reply
Workflow Hero

Re: Value of common 'Current User' in JavaScript

Jump to solution

great!

please mark the question answered.

0 Kudos
Reply