- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016 11:34 AM
Hi Everyone,
I'm putting together a Record Producer that will ultimately feed into the Call table. I've got a need to show and hide fields, but am struggling to handle them through basic UI Policies, so I'd like to use the true/false scripts, but I'm struggling with the proper syntax. I've tried a few different options to no avail.
function onCondition() {
if(current.variables.authorization != 'Yes'){
alert("Syntax Correct");
//g_form.setDisplay('producer.instructions', true);
}
}
Thanks,
Scott
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 06:00 AM
Thanks folks, after going in a few circles, I finally just wrote it as a client script. The suggestions you guys gave got me started down that road. Below is the syntax for a simple client script against a record producer.
if(g_form.getValue('authorization') == 'Yes'){
//alert("Auth: Yes");
g_form.setMandatory('cif', false);
g_form.setValue('cif', '');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016 11:37 AM
- if(g_form.getValue('variables.authorization') != 'Yes'){
- alert("Syntax Correct");
- }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2016 11:41 AM
current object is only availabel on server side. Use this
function onCondition() {
if(g_form.getValue('authorization') != 'Yes'){
alert("Syntax Correct");
g_form.setDisplay('instructions', true);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 06:00 AM
Thanks folks, after going in a few circles, I finally just wrote it as a client script. The suggestions you guys gave got me started down that road. Below is the syntax for a simple client script against a record producer.
if(g_form.getValue('authorization') == 'Yes'){
//alert("Auth: Yes");
g_form.setMandatory('cif', false);
g_form.setValue('cif', '');