- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2015 03:20 AM
Below is the code for setting value.
function onChange() {
if (g_form.getValue('variables.UserType') == 'Terminal Server Users')
{
g_form.setValue('variables.OutlookEmail',true);
g_form.setValue('variables.ServiceNowAccount',true);
g_form.setValue('variables.TerminalAccess',true);
}
}
When I keep alerts it is showing as true but on the form check box is not getting ticked.
Please help what is missing
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:46 PM
Hi All,
Now it is working after modifying as below.
function onChange() {
//var user = g_form.getValue('variables.UserType');
if (g_form.getValue('UserType') == 'Terminal Server Users')
{
g_form.setValue('OutlookEmail','true');
g_form.setValue('ServiceNowAccount','true');
g_form.setValue('TerminalAccess','true');
}
else if (g_form.getValue('UserType') == 'External Users with Archroma Laptop')
{
g_form.setValue('OutlookEmail','true');
g_form.setValue('ServiceNowAccount','true');
g_form.setValue('TerminalAccess','false');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:04 PM
Hi Pradeep,
Tried like below but still not working.
function onChange() {
//var user = g_form.getValue('variables.UserType');
if (g_form.getValue('variables.UserType') == 'Terminal Server Users')
{
g_form.setValue('OutlookEmail',true);
alert(g_form.getValue('variables.OutlookEmail'));
g_form.setValue('ServiceNowAccount',true);
g_form.setValue('TerminalAccess',true);
}
else if (g_form.getValue('variables.UserType') == 'External Users with Archroma Laptop')
{
alert('external');
g_form.setValue('OutlookEmail',true);
g_form.setValue('ServiceNowAccount',true);
g_form.setValue('TerminalAccess',false);
alert(g_form.getValue('variables.TerminalAccess'));
}
I kept alerts and they are popping up correctly but checkboxes are not getting checked. Please let me know what I am missing.
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:08 PM
Hi Mounika,
In the if and else if condition still I can see you are using the variables. Can you please remove
g_form.getValue('variables.UserType')
g_form.getValue('variables.UserType')
Remove variables from above i.e g_form.getValue('UserType')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:13 PM
Tried as below but still not working.
function onChange() {
//var user = g_form.getValue('variables.UserType');
if (g_form.getValue('UserType') == 'Terminal Server Users')
{
g_form.setValue('OutlookEmail',true);
alert(g_form.getValue('variables.OutlookEmail'));
g_form.setValue('ServiceNowAccount',true);
alert(g_form.getValue('variables.ServiceNowAccount'));
g_form.setValue('TerminalAccess',true);
alert(g_form.getValue('variables.TerminalAccess'));
}
else if (g_form.getValue('UserType') == 'External Users with Archroma Laptop')
{
alert(g_form.getValue('variables.UserType'));
g_form.setValue('OutlookEmail',true);
g_form.setValue('ServiceNowAccount',true);
g_form.setValue('TerminalAccess',false);
alert(g_form.getValue('variables.TerminalAccess'));
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:46 PM
Hi All,
Now it is working after modifying as below.
function onChange() {
//var user = g_form.getValue('variables.UserType');
if (g_form.getValue('UserType') == 'Terminal Server Users')
{
g_form.setValue('OutlookEmail','true');
g_form.setValue('ServiceNowAccount','true');
g_form.setValue('TerminalAccess','true');
}
else if (g_form.getValue('UserType') == 'External Users with Archroma Laptop')
{
g_form.setValue('OutlookEmail','true');
g_form.setValue('ServiceNowAccount','true');
g_form.setValue('TerminalAccess','false');
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2015 10:50 PM
Perfect
Can you please mark the response if that answers your question.