Record producer - category/subcategory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 04:44 PM
Hello all,
I created a record producer for users to report issues with our enterprise applications.
At first I only had one category and a list of subcategories so the form was working fine, but now that our requirement is to add multiple categories and multiple dependent subcategories it no longer is working.
Since these subcategories are not listed in the oob incident form, I can't get the subcategories to be dependent on the category.
I have seen a couple of threads that suggest creating a catalog client script, but if this is the way to go not sure what variable type the category/subcategory fields should be.
If anyone has suggestions or guidance they would be greatly appreciated!!
Thanks in advance!
Grace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 05:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 05:07 PM
Switch to the Advanced view to see the tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2018 03:21 AM
Hi,
The dictionary dependent value doesn't work in Catalog items. you have to use an onChange client script on the category field and make sure the client script UI Type is selected as "ALL" to run the script in Portal.
The Variable type should be a select box.
Sample script :
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
g_form.clearOptions('sub_category');
return;
}
var cat=g_form.getValue('category');
if (cat=='abc'){
g_form.clearOptions('sub_category');
g_form.addOption('sub_category','','--None--');
g_form.addOption('sub_category','value', 'label');
}
else if (cat=='bbc'){
g_form.clearOptions('sub_category');
g_form.addOption('sub_category','','--None--');
}
}
Thanks,
SD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2018 08:43 AM
Thanks for the response SD.
This is a record producer so wouldn't it be different than a catalog item? Also, I tried adding the client script but there isn't a place to specify what cat item/record producer it should be applied to see below.
I also replaced your placeholders but not sure if I'm doing it correctly...
