need help in cilent script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 09:24 PM
Hi Team
can any one please help me , in this request
for the particular catalog item , Based on the type of request , Infrasturure request should populate .
can any one please provide me script for this .
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2024 11:30 PM
Hello @nameisnani ,
Please create OnChange Client script and try below code:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var infrastructureRequest = 'infrastructure_request'; // Replace with the actual variable name for Infrastructure Request
// Clear current options
g_form.clearOptions(infrastructureRequest);
// Add options based on the selected type of request
if (newValue === 'Kyndryl Mainframe') {
g_form.clearOptions('infrastructure_request');
g_form.addOption(infrastructureRequest, 'request_for_information', 'Request for Information');
g_form.addOption(infrastructureRequest, 'audit_enquiries', 'Audit Enquiries');
g_form.addOption(infrastructureRequest, 'data_extract', 'Data Extract');
g_form.addOption(infrastructureRequest, 'infrastructure_design_enquiries', 'Infrastructure Design Enquiries');
g_form.addOption(infrastructureRequest, 'shared_folder_access', 'Shared Folder Access');
g_form.addOption(infrastructureRequest, 'storage_backup', 'Storage & Backup');
} else if (newValue === 'AWS') {
g_form.clearOptions('infrastructure_request');
g_form.addOption(infrastructureRequest, 'request_for_information', 'Request for Information');
g_form.addOption(infrastructureRequest, 'audit_enquiries', 'Audit Enquiries');
g_form.addOption(infrastructureRequest, 'data_extract', 'Data Extract');
g_form.addOption(infrastructureRequest, 'infrastructure_design_enquiries', 'Infrastructure Design Enquiries');
g_form.addOption(infrastructureRequest, 'shared_folder_access', 'Shared Folder Access');
g_form.addOption(infrastructureRequest, 'storage_backup', 'Storage & Backup');
} else {
// Add default options or handle other cases if necessary
}
}
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Pratiksha