- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 02:47 AM
Hey team,
Need a client script for below conditions
Then
output would be
currency -usd
country -US
also work not should be mandatory
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 04:17 AM
Hello @pramn
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 05:09 AM
var subcat = g_form.getValue('sub_category'); var request = g_form.getValue('request_type');
is the drop down value ..so its giving me theerror
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 05:41 AM
Hello @pramn
in that case use g_form.getDisplayValue('sub_category');
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 03:08 AM
Hi you can write a onchange client script on field Request Type
sample script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var getSubCat = g_form.getValue('subcategory');
var getReqType = g_form.getValue('request_type');
if (getSubCat == 'your choice value' && getReqType == 'your choice value' )
{
g_form.setValue('currency','USD'); // field name, value
g_form.setValue('country','US');
g_form.setMandatory('work_notes',false);
}
else
{
g_form.setMandatory('work_notes',true);
}
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 05:10 AM
var subcat = g_form.getValue('sub_category'); var request = g_form.getValue('request_type');
is the drop down value ..so its giving me the error