Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

{Me} equivalent for use in Script Function?

What is the syntax to get the current user's name in order to update a person column within a script function on a Nitro form?

Hi Bob,

Please use this line "_spPageContextInfo.userId" in script function to get the current logged in user. You can use this in Form Event Actions to set current logged in user in a person or group column. Please refer below sample script:

var userid= _spPageContextInfo.userId;
return userid;

 

Uploaded files:
  • FAE-Update.png
bob has reacted to this post.
bob

Here's another {Me} question:

When configuring permissions for a custom action, is the following condition valid?

If logged in User In User/Group Group_Name

and if the below conditions are met:

AssignedTo equal {Me}

 

Hi Bob,

Yes, we can use {Me} placeholder for 'Assigned To' column in custom action conditions. Also, instead of configuring conditions, we can directly use logged in user in column settings in Custom Actions (see screenshot below).

Uploaded files:
  • Conditions-Settings.jpg