Choice list with multiple dependent values?

Jake Berkes
Tera Expert

This has had me stumped for a while and I'm hoping someone can help.

 

I have a Symptoms dropdown list that I'm trying to make dependent on the Incident Category. Any one symptom may need to appear in the list for several categories, which is where I'm running into problems.

 

Example:

CategorySymptom
Cat1

Sym1

Sym3

Sym5

Cat2

Sym1

Sym2

Sym3

Cat3

Sym2

Sym3

Sym4

Cat4

Sym2

Sym4

Sym5

 

The symptoms list is about 30 items long, with several symptoms needing to appear based on each category. Using a standard dependent value requires multiple instances of each symptom in the choice list, which is tedious and gets out of hand quickly (around 200 items in choice list).

 

Is there a better way to do this? It almost seems like I need to reverse the dependency, but I'm not sure how to go about it - Sym1 = Cat1, Cat2; Sym2 = Cat2, Cat3, Cat4, etc.

 

Hope this makes sense, please let me know if I can clarify at all. Thanks!

10 REPLIES 10

Ankan Mukherje1
Giga Expert

Hello All,

I wrote a simple 'Business Rule'(before or after) on the form table as below(showing the example of 2 fields but it can be extended to any number of fields) and it is working as expected.

 

Syntax

======

(function executeRule(current, previous /*null when async*/) {

var A = current.(Your First Field);
var B = current.(Your Second Field);

if(A == "(give desired choice value of the First Field)" && hosted == "(give desired choice value of the Second Field)"){
current.(Your Result Field) = '(give choice value you want to see)';
} else if(A == "(give desired choice value of the First Field)" && hosted == "(give desired choice value of the Second Field)") {
current.(Your Result Field) = '(give choice value you want to see)';
}else {
current.(Your Result Field) = '(give choice value you want to see)';
}
})(current, previous);

 

Please try it at your end and mark my answer as 'correct answer' if it helps you.

Thanks!!