- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 11:04 AM
Hi,
I have a catalog item and in the workflow there are user and group approvals triggering. I want to display a message on the ServiceNow Approval form generated to whichever user saying for this particular Catalog item- 'Approval is needed due to the inability to test this application and/or component out of region/data center'
I tried scripting in the Workflow approval activity as well as a Client script and Script include but it's not working for me.
Can some one please help me on how to do this with detail?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 05:36 PM
Adding a info message in workflow will not be a valid option when you want to display an info message to your end user, you can use display business rules or on load client script and check the current approval form approval for record and a catalog item referred in the approval for record.
if your cat item dot walked is the one which you are looking for, then you can add an info message in the same script
you can also go with a display business rule on the approval table and keep the condition with your item name using condition builder and add an info message. In this case you need not use client script and script include as everything can be handled from server side in your case.
Thanks,
Siva
Mark this response as correct and helpful if it really helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 02:05 PM
Would a dedicated email workflow activity or separate email notification work?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 03:18 PM
Something like this should work.
Create a business rule on the sysapproval_approver table.
When to run would be "display"
Click advanced and enter the script below - you need to replace the name of the catalog item with your items name instead of "test".
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.document_id);
gr.query();
if(gr.next()) {
if(gr.cat_item.name == 'test') { //replace test with your item name
gs.addInfoMessage("Approval is needed due to the inability to test this application and/or component out of region/data center");
}
}
Worked for me in my PDI.
If this was helpful, or correct, please be kind and click appropriately!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 05:36 PM
Adding a info message in workflow will not be a valid option when you want to display an info message to your end user, you can use display business rules or on load client script and check the current approval form approval for record and a catalog item referred in the approval for record.
if your cat item dot walked is the one which you are looking for, then you can add an info message in the same script
you can also go with a display business rule on the approval table and keep the condition with your item name using condition builder and add an info message. In this case you need not use client script and script include as everything can be handled from server side in your case.
Thanks,
Siva
Mark this response as correct and helpful if it really helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 11:03 PM
Thanks Siva, I was able to do this yesterday with Client Script and Script Include with your help!