- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:18 PM
I m using a Business rule in my catalog item. I try to access the variable in my catalog item inside the Business rule as
current.variables.select_the_macro but its returning undefined..
I have one script include that executes as part of the workflow for that particular catalog item.. in that script include i m using as current.variables.select_the_macro.. There it works perfectly fine but not inside the BR..
So within BR, is there a different way to access the Catalog item Variable?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:54 PM
You should be using current.request_item.variables.variable_name
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:44 PM
Make sure the variable is visible on catalog task.
Or make the variable global by marking it global in the variable itself.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:50 PM
The variable's visibility is set everywhere..but how to access it in the BR....i m writing the BR on sc_task table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:54 PM
You should be using current.request_item.variables.variable_name
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2021 09:08 PM
This solution isn't working fine for me. I tried this solution to fetch "requested_for" variable from catalog item, but its not taking. Please review it and correct me .
I have also attached the screenshot of my output Im getting.
(function executeRule(current, previous /*null when async*/) {
current.short_description="This catalog item is ordered for"+current.request_item.variables.requested_for;
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:49 PM
Hello Kailash,
It looks like the variables are not visible on the task table. Either you can make those variables visible by selecting all the variables at catalog task level(by editing the workflow) if not you can fetch from request item as current.request_item.variables.select_the_macro
Edit: GlideRecord is not required.