In Flow Designer, how can I get the current login user?

JLeong
Mega Sage

Hi Guys,

In Flow Designer, what is the command/syntax to get the current login user?

Thank you!

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

HI JLeong,

        Sorry my bad use this :

               outputs.result = gs.getUserID(); //getUserID() is a function.

find_real_file.png

Please Mark as correct or helpful if my solution help you to solve your query.

 

Regards,

Meghnath

View solution in original post

16 REPLIES 16

Jeff Currier
ServiceNow Employee
ServiceNow Employee

Wouldn't it just be this?

var myuser = fd_data.trigger.current.user_id;
return myuser;
 
This would be in a function to set a variable or field for example.  Was there a different usage you wanted?

Hi Jeff,

Thanks for responding to my questions. Sorry I didn't realize my first question  went thru.

I tried what you suggested but it didn't work:

find_real_file.png

Thanks!

Jeff Currier
ServiceNow Employee
ServiceNow Employee

Maybe a screen shot of the Flow designer step with the variable definition will help me see what is going on.

Please see attached: