Pull results from a variable lookup select box?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2013 04:31 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2013 12:03 PM
You can search for 'Smart Phone' as the Message START in All logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2013 12:15 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2013 11:58 AM
Shane,
If your questions were answered, please remember to mark this post as 'Answered'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2013 12:02 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2013 12:21 PM
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();