How to get catalog variable values in business rule ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 12:03 PM
Hi,
How to fetch catalog variable value in an after business rule.
I tried --> current.variables.<variable_name> but not working correctly.
Thanks,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 10:34 AM
Hi Jaspal,
Yes, the RITM I am checking log for has user_name variable in the variable editor.
Thanks,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 06:49 AM
Hi,
Are you sure the BR ran?
What logs did you add and what's your analysis?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2022 10:41 AM
Hi Ankur,
I am sure the BR ran.
I have put 2 log statements as below:
gs.log("Form field value is: "+current.u_requested_foor); // this is the requested for field on the RITM form
gs.log("Variable editor variable value is: "+current.variables.user_name); // this is the user name variable in variable editor in the same RITM form
The first statement returns the sys_id of the user (as expected) but the second statement returns undefined.
Thanks,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2022 08:37 PM
Hi,
is this happening for all variables under that RITM?
Are you checking this as an admin?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2022 09:00 PM
Hello Ankur,
Yes I am an admin user. This is happening for all variables but not for any fields on the RITM form.
Thanks,
Gopi