- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 02:31 PM
Hi Every body,
I am not get answer after ,Could any one help out what is error.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 03:24 AM
I have tested your script in my instance and i haven't get any error in that even it's working fine.
Try this script again
and make sure the name of your request type choice option value should be correct and avoid spacing in the name.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
if (newValue =='induiry/help') //request type choice value
{
g_form.clearOptions('category');
g_form.addOption('category', '', '-- None --');
g_form.addOption('category', 'RFx Project Mapping/Upload', 'RFx Project Mapping/Upload');
g_form.addOption('category', 'Export/Format RFx', 'Export/Format RFx');
g_form.addOption('category', 'Request for Response', 'Request for Response');
g_form.addOption('category', 'Financial Statement Request', 'Financial Statement Request');
g_form.addOption('category', 'Upload QAs in Content Library', 'Upload QAs in Content Library');
g_form.addOption('category', 'User Action', 'User Action');
g_form.addOption('category', 'User Trainning', 'User Trainning');
}
else if (newValue =='software test')
{
g_form.clearOptions('category');
g_form.addOption('category', '', '-- None --');
g_form.addOption('category', 'Upload QAs in Content Library', 'Upload QAs in Content Library');
}
else if (newValue =='hardware')
{
g_form.clearOptions('category');
g_form.addOption('category', '', '-- None --');
g_form.addOption('category', 'RFx Project Mapping/Upload', 'RFx Project Mapping/Upload');
g_form.addOption('category', 'Export/Format RFx', 'Export/Format RFx');
}
else if (newValue =='network')
{
g_form.clearOptions('category');
g_form.addOption('category', '', '-- None --');
g_form.addOption('category', 'Request for Response', 'Request for Response');
g_form.addOption('category', 'Financial Statement Request', 'Financial Statement Request');
}
else if (newValue =='database')
{
g_form.clearOptions('category');
g_form.addOption('category', '', '-- None --');
g_form.addOption('category', 'User Action', 'User Action');
g_form.addOption('category', 'User Trainning', 'User Trainning');
}
}
See the attachement
Thanks and regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 11:11 PM
Hello,
You do not need to add option of none when changing the options. Below is not required. None is automatically added to the select box field if you have selected "Include None" option in type specification of the variable.
g_form.addOption('category', '', '-- None --');
Remove this line in all the conditions and try.
If my answer has helped you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 11:41 PM
Can you explain more about your requirement because you can make dependent field on the catalog item without writing the client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 07:43 PM
Hi Seraj,
i am usin two variable in catalog item
and i want to change the vale of 1 then i want only reflect only choice of these.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2024 08:24 PM
I simulated your client script on my PDI and it is working as expected. I suspect that you might have given the select box choices label in newValue == '' instead of the choice value. Please go to your request type variable and check the choice values as shown below :
Accordingly, change your On-Change client script.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.