Select Box Variable with Decision Builder

enired
Tera Contributor

Hi, I'm new and I was hoping someone could explain to me if I'm doing something wrong.

 

I am exploring Decision Builder and wanted to use the value selected on the catalog item's color select box variable for the decision result.

 

However, when I try to use it in the condition column the box is greyed out. Are select box variable types unsupported to use in the decision table? Or is there a way to get the values in the select box?

 

Thank you.

1 REPLY 1

Karan Chhabra6
Mega Sage

Hi @enired ,

 

You can set the input & condition type as string in the decision table, and pass the value of the selectbox while you call the decision table.

Script for calling the decision table:

var dt = new sn_dt.DecisionTableAPI();
var inputs = current.variables.<select box variable name>;
var response = dt.getDecision('<sys_id of the decision table>', inputs);
var resp = response.<result column name>;

KaranChhabra6_0-1683325154422.png

 

 

If my answer has helped with your question, please mark it as correct and helpful

 

Thanks!