How to have reference qual for dynamically selected value

SSA1
Giga Expert

Hi,

I need to populate list field ( field name- category) dynamically, based on selected value on  drop down( field name - type), I have wrote the following reference qualifier. But the issue is I need to get the selected value to u)type field dynamicaly.

That means let's say type field has two values A,B.

If type is A,

then category should be A1,A2,A3

 

If type is B,

then category should be B1,B2,B3

 

find_real_file.png

 

 

So, according to the above query when I select type A, and select category, nothing is populating

how can I modify this query to take the dynamic value of type field and filter.

Any suggestion is highly appreciated!

 

 

1 ACCEPTED SOLUTION

Mahesh23
Mega Sage

Hi,

you are using reference fields, you should be able to make the following changes to your variables:


Category variable:
Reference qualifier: name=incident^element=category^inactive=false^ORDERBYsequence

Subcategory variable:
Reference qualifier: javascript:'name=incident^element=subcategory^inactive=false^dependent_value=' + current.variables.category + '^ORDERBYsequence';
Variable attributes: ref_qual_elements=category

I am guessing that your category variable name is category. If it is something different, change the ref_qual_elements accordingly.

View solution in original post

2 REPLIES 2

Mahesh23
Mega Sage

Hi,

you are using reference fields, you should be able to make the following changes to your variables:


Category variable:
Reference qualifier: name=incident^element=category^inactive=false^ORDERBYsequence

Subcategory variable:
Reference qualifier: javascript:'name=incident^element=subcategory^inactive=false^dependent_value=' + current.variables.category + '^ORDERBYsequence';
Variable attributes: ref_qual_elements=category

I am guessing that your category variable name is category. If it is something different, change the ref_qual_elements accordingly.

Hi Mahesh

The "order" isn't working for me:

This is my ref qualifier:

javascript: 'inactive=false^element=' + current.variables.element + '^ORDERBYsequence';

I auto-populate the element variable with the value to query the sys_choice table. This works fine but the values shown aren't ordered. Any suggestion?

 

Thanks,

Ariel