- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 10:03 PM
Hello,
How can I populate one field's value based on other field's value using 'sys_choice' table dependent field option in MyServicePortal front end ?
I don't want to use script. Just want to populate using dependent field option in sys_choice table. But this is working in backend not in front end. I want that in front end/ServicePortal in catalog_form.
Regards,
Atanu Maity
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:28 PM
Hello @A_maity002 ,
Please refer this community article, this article all the answers for queries. please check let me know if you still have some questions
Creating Dependent Variables in Service Catalog? Here are two ways how it can be done.
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:28 PM
Hello @A_maity002 ,
Please refer this community article, this article all the answers for queries. please check let me know if you still have some questions
Creating Dependent Variables in Service Catalog? Here are two ways how it can be done.
Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.
Regards,
Siddhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 02:07 AM
Hello @Siddhesh Gawade ,
Thanks for providing the reference article.
Kind regards,
Atanu Maity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2024 11:45 PM
Hi,
Unfortunately, catalog variables do not have a dependency like a field we have on the forms.
The dependent variables can be created using a Client Script.
On change Client Script: Onchange of Category field write following script
function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { g_form.clearOptions('subcategory'); g_form.addOption('subcategory', '', '-- None --'); return; } if(newValue =='Category 1') { g_form.clearOptions('subcategory'); g_form.addOption('subcategory', '', '-- None --'); g_form.addOption('subcategory','Subcategory11','Subcategory11'); g_form.addOption('subcategory','Subcategory12','Subcategory12'); g_form.addOption('subcategory','Subcategory13','Subcategory13'); } else if(newValue =='Category 2') { g_form.clearOptions('subcategory'); //g_form.addOption('subcategory', '', '-- None --'); g_form.addOption('subcategory','Subcategory21','Subcategory21'); g_form.addOption('subcategory','Subcategory22','Subcategory22'); g_form.addOption('subcategory','Subcategory23','Subcategory23'); } else if(newValue =='Category 3') { g_form.clearOptions('subcategory'); g_form.addOption('subcategory', '', '-- None --'); g_form.addOption('subcategory','Subcategory31','Subcategory31'); g_form.addOption('subcategory','Subcategory32','Subcategory32'); g_form.addOption('subcategory','Subcategory33','Subcategory33'); } }