- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2015 12:59 PM
I am currently working on a workflow and messing around with some approvals. In my form, I have the user fill out a "who is your manager?" field from a reference. I want to, then, have the approval task pull from the field they filled out in the form and email that specific manager for approval. Thoughts/ideas?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2015 07:26 AM
Hi Alex,
In the approval activity, check the advanced checkbox and put the following in the script field. You're pushing two user ids to an array for the approval activity to use.
answer = [];
answer.push(current.variables.manager.sys_id);
answer.push(current.variables.div_dir.sys_id);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 12:53 PM
This was extremely helpful for me as I am trying to do something very similar. Regarding the ability to access the variables through current.variables.variable_name, is there documentation or a wiki that would help me find out what variables and items are available? Other than you stating you can use current.variables I would have not known I could access this. Is there something that lays out the current namespace so I can see what is accessible or how to get other values from forms? I'm still fairly new to working with workflows so I may not have found the correct resource yet.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 06:32 AM
Hi Jacob,
current typically applies to the current record you're working against, and current.variables usually applies to any variables that may be associated with that table. You may or may not have access to the current object from different places in ServiceNow where you can run javascript in ServiceNow.
The developer site has the most complete API, but it's usually better to search the developer and documentation sites for information around what you're looking to do. I think the absolute best resource for this is the scripting class that ServiceNow offers for a fee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 12:55 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 01:28 PM
Do you have a variable named manager?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 01:40 PM