- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 08:51 AM
Hi,
I have a record producer form that feeds the Change Request table. On the form there is a Lookup Select Box variable that references a custom "Keyword" table and an Assignment Group field that references the sys_user_group table. I named the Assignment Group variable the same as what it's named in the Change Request form, in order to use the Record Producer functionality and carry over the value to the Change Request form. I will eventually add a UI Policy to "hide" the Assignment Group field, as the requester doesn't need to see it.
My issue is I can't figure out a way to set the Assignment Group if the requester selects "Keyword Not Listed" from the Lookup Select Box "Keyword" Variable. I have attached a screen shot of the form. Any assistance would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 10:28 AM
I am not seeing any attachment with your last post, however, I have update my code
getDisplayValue is corrected to getDisplayValue()
if(producer.'name of your drop down variabve'.getDisplayValue() == 'Keyword Not Listed')
{
current.assignment_group = 'sys_id of the group';
}
else if // do here for other conditons simirlay.
{
}
I posted the corrected code, can you try with this and check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 10:28 AM
I am not seeing any attachment with your last post, however, I have update my code
getDisplayValue is corrected to getDisplayValue()
if(producer.'name of your drop down variabve'.getDisplayValue() == 'Keyword Not Listed')
{
current.assignment_group = 'sys_id of the group';
}
else if // do here for other conditons simirlay.
{
}
I posted the corrected code, can you try with this and check?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 10:48 AM
Sorry, I missed it.
I could see your attachment.
kindly check with below code
if(producer.'name of your drop down variabve'.getDisplayValue() == 'Keyword Not Listed')
{
gs.log('Mike I am in loop :' + producer.'producer.'name of your drop down variabve'.getDisplayValue()');
current.assignment_group = 'sys_id of the group';
}
gs.log('Mike I am out of loop:' + producer.'producer.'name of your drop down variabve'.getDisplayValue()');
Also check in logs what gets printed whether statement inside IF or outside IF
Also check the value of producer.'name of your drop down variabve'.getDisplayValue()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 11:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 11:32 AM
ok, that is fine, what value is being displayed after that, that is important.
Can you attach screenshot of it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2015 11:32 AM
My apologies Deepak, I didn't initial see that you added an open and closed parenthesis after the getDisplayValue. I added the parenthesis and the script works now.
Thank you very much!
if(producer.'name of your drop down variabve'.getDisplayValue()