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
07-28-2022 12:05 PM
Hello,
What table are you using this business rule on?
If Request Item/Catalog Task, then current.variables.variable_name would work.
Please provide more information!
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 12:54 PM
Hi,
I am running After Insert BR on sc_req_item table but current.variables.<variable_name> is not working.
Thanks,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 01:00 PM
can you try sharing your script may be we can help if we see that?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 01:08 PM
Hello,
Thank you for replying with a small bit of information.
Please share what you mean by "it's not working". As has been asked, please share script, screenshot, anything else for us to help you further.
If you're trying to set a value on the current record, then an "after" business rule will not work.
If you're using something like:
gs.info("***DEBUG - Variable value is: " + current.variables.variable_name);
Check your system log and see if that is there, is the value is there, then again, you're using the right format, something else is probably incorrect with your code.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!