Current.Variables.Variablename returning undefined in Business rule

kailashthiyagar
Kilo Guru

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?

1 ACCEPTED SOLUTION

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.

View solution in original post

12 REPLIES 12

pradeepksharma   sanjivmeher



Both of your responses worked.. Thanks.. not sure which one to mark as correct


Sanjiv should get credit on this one. GlideRecord is not required in this case to fetch the variable values from the item


I realized this after I posted my code.


randrews
Tera Guru

i am confused by the variable select_the_macro... is this an actual macro on the form.. and if so what does it do??


macros generally execute a script and don't have a value per se   like a normal variable will.