Field subcategory field depending on multiple categories field sys_choice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2024 12:53 AM
Hello,
I have an issue, I try to create my script include function to set the subcategory results depending on category value.
I created a simple script include with all the conditions filter from the sys_choice, in the reference qual i put this -> javascript: new EDFcatalogUtils().getSubcategory(current.variables.v_category);
Thanks for your help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 02:44 AM
getSubcategory: function(subcategory){
//Filter the subcategory to with the category
var grINC = new GlideRecord('sys_choice');
var subcategories = [];
gs.info("Subcategory et subcategories" + ' '+ subcategories + ' '+ subcategory);
grINC.addEncodedQuery('element=subcategory^name=incident^language=fr^inactive=false' + subcategory);
grINC.query();
while (grINC.next()) {
// Ajoute le sys_id de chaque enregistrement trouvé dans le tableau listSubcategory
subcategories.push(grINC.subcategories.toString());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2024 02:45 AM
portal form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 12:54 AM
yes Portal form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 12:54 AM
yes portal form