Return Values from Template_Value

Community Alums
Not applicable

Hi there,

I'm trying to return the assignment_group value from template_value on a Standard Change Proposal form.

We need to add a step for approval from the team which has been assigned to the new Standard Change under the "Template_value.Assignment_Group" but I'm unable to successfully retrieve this value.

Under the Change Request Values section I can see the value; added a screenshot from my PDI as an example.

Any help would be greatly appreciated.

Regards,

Pete.

2 REPLIES 2

Vaishnavi Lathk
Mega Sage
Mega Sage

Hi,

Not sure of your end result requirement here, but you can query the sys_template table for a specific sys_id (for example) and then look for the value of a specific entry on it. If you're doing this in the client, then you'd want to utilize GlideAjax to return that value back to your client from the server: https://community.servicenow.com/community?id=community_article&sys_id=9f7ce2e1dbd0dbc01dcaf3231f961...

In server side script, you could find value like this (EXAMPLE😞

var gr = new GlideRecord('sys_template');
gr.get('sys_id_of_template');
gs.info('***Short Description from Template is: ' + gr.short_description);

Then if it equals what you're wanting it to do, you could apply the template through script as well with:

https://servicenowguru.com/system-definition/advanced-templates/

Please mark reply as Helpful/Correct, if applicable. Thanks!

Regards,

Vaishnavi

dmathur09
Kilo Sage
Kilo Sage

Hi Pete,

The standard change request has a workflow linked to it. To make any modifications to the process, like the one you want(adding approvals). You would need to modify the change request workflow and add the approval activity and use the assignment group field to get the approval group in your workflow approval activity.

Let me know in case you have any further queries

If you think my response is helpful for you? If yes, mark it as correct answer and close the loop so that it would help future readers as well.

Regards,
Deepankar Mathur