Displaying field values in a workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014 06:10 AM
I have a workflow with several task. On the first task, values are being populated in several fields. The fields are hidden on all task that follow through a UI policy but I need the values that were entered from the first task to display in the description field of some of the tasks that follow. Here is my script for one of the task where I just need the populated field information displayed in the description field. This is not working so if anyone knows how I might accomplish this that would be greatly appreciated.
task.description = "Server Name: " + current.variables.u_server_name.getDisplayValue() + '\n' +
"DNS entries to delete: " + g_form.getValue(u_dns_entries_to_delete) + '\n' +
"iLO DNS entry to delete: " + g_form.getValue(u_ilo_dns_entry_to_delete) + '\n' +
"IPInfo.bat: " + g_form.getValue(u_ipinfo_bat) + '\n';
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014 07:51 AM
Yes the screenshot is from the first sc_task record created from a catalog task in the workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014 07:57 AM
Also, where is task.description going to? Is this another catalog task we are creating, or something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014 08:11 AM
Yes the task description will go to the next Catalog Task that will kick off when the first is closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014 08:37 AM
It might be best to use a run script activity to perform a GlideRecord query to grab the previous catalog task. Then, also in the run script, you can construct the description and store it in the scratchpad, to be used when you make the next catalog task.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2017 01:53 AM
Hi Amatthews,
As i can see in you code that you are using g_form (works at client side) in workflow (which works at server side).
to avoid this error you can use current.variable name incited of g_form.
You can do something like :
task.description = "Server Name: " + current.variables.u_server_name.getDisplayValue() + '\n' + "DNS entries to delete: " + current.u_dns_entries_to_delete + '\n' +
"iLO DNS entry to delete: " + current.u_ilo_dns_entry_to_delete + '\n' + "IPInfo.bat: " + current.u_ipinfo_bat + '\n';
Thanks
Sandeep
Please hit and like if you find helpful.