- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2019 11:46 PM
Hi All,
I need help to rename the choices just for normal change, i have a field with Yes or No choices. if the ticket is normal change then i need to show yes choice as Yes - automatically. How can i do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 10:48 PM
Hi asifnoor,
Thanks for the suggestions. Here is my script and its working as expected.
if (Type == 'normal'){
g_form.clearOptions('u_alerts');
g_form.addOption('u_alerts','Yes','Yes - Automatically');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2019 11:54 PM
Hello Osma
You can write onChange Client script to achieve the requirement.
please provide a screenshot what exactly you want to so I can help you directly with scripting.
Thanks,
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2019 12:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2019 12:20 AM
Hello Osma,
1. Create a new client script with below configuration on the table which these fields are available:
2. Check below script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var type =g_form.getValue('u_type'); // replace u_type with your Type name
if(type == 'normal'){
g_form.setValue('u_alerts','yes'); // replace u_type with your Type name
}
else{
g_form.setValue('u_alerts','no');
}
}
Please mark answer correct if you find it as helpful
Thanks,
Abhishek Gardade
Abhishek Gardade

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2019 12:24 AM
You can have a onChange Client script on field "Type"
Below script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var checkType = g_form.getValue('type');
if(checkType == 'normal') //Normal change type
{
alert("yes");
g_form.setValue("u_alert",'Yes'); // set alert field to yes
}
else
{
alert("Np");
g_form.setValue("u_alert",'No');
}
}
Harish