Pull results from a variable lookup select box?

SC10
Kilo Guru

I have a variable, called Variable1 that is a lookup select box, pulling from a table. The table contains entries with values of A, B, and C.

In my workflow, I have an If statement returning a Yes or No. I would like the If statement to result in Yes, if the client script's select box variable selects "A" or "B" as it's value. If "C" is chosen, it would result in a No.

I tried using the following script for the If in the workflow, but am getting GetDisplayValue not defined as an error:

answer = isSmart();

function isSmart(){
var check= getDisplayValue(Variable1);
if(check == "A" || "B"){
return 'yes';
}else{
return 'no';
}
}


Any help is greatly appreciated.

Thank you.

19 REPLIES 19

You can search for 'Smart Phone' as the Message START in All logs.


Ran the search a few times from both All logs, and Script Log Statements, with:

All>Created on Today>Source = *** Script>Message starts with Smart Phone


Nothing is coming up unfortunately.


Shane,
If your questions were answered, please remember to mark this post as 'Answered'.


I appreciate your help Terri, but it looks like even though I selected the iPhone, it is resulting in a No, when it should be a yes. I am trying to find the log that would indicate this, but am coming up short. Your continued assistance is greatly appreciated.


I would need to see what the logs are displaying. Is it even getting into the IF?
Try the logs in the main part of the IF, before answer = :

gs.log('Variable - '+current.variables.smart_phone);
gs.log(' DISPLAY: '+current.variables.smart_phone.getDisplayValue());
answer = isSmart();