How to get catalog variable values in business rule ?

Gopi22
Giga Guru

Hi,

How to fetch catalog variable value in an after business rule. 

I tried --> current.variables.<variable_name>  but not working correctly. 

Thanks,

Gopi

17 REPLIES 17

Allen Andreas
Administrator
Administrator

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!

Hi,

I am running After Insert BR on sc_req_item table but current.variables.<variable_name> is not working.

Thanks,

Gopi

can you try sharing your script may be we can help if we see that?

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!