Variable Set - Lookup Select Box - (client script onLoad issue)

Dazler
Mega Sage

Hi, I created a variable set used on 3 Catalog Item forms that has 3 lookup select box variables that pulls in the information from the Category, Subcategory, and Components from the Incident table.  I have been asked to autopopulate on 1 of the forms the category and subcategory with a default value. So in a client script I created an onLoad script that will populate those fields.

find_real_file.png

 

On the component field, the user will select the component that fits their request.

This is how my Type Specifications are set for the Component field.

find_real_file.png

 

And I have the variable attributes req_qual_elements set to subcategory

find_real_file.png

 

The problem is that when the form loads, it populates the category and subcategory fields as it should, but the component fields does not display the list based on the filter of that field.

find_real_file.png

 

If I manually change the subcategory field, then the list drops down.

find_real_file.png

 

Does anyone know what is causing this or how to fix it?  Would it be better to set these up using a script include?

1 ACCEPTED SOLUTION

No problem. I think the onLoad does not trigger the Advanced reference qualifier to recalculate.

You have 2 options:

  • Duplicate the variables and use the duplicates with default value for this form.

Or

  • Create a Script include that returns the Reference qualifier based on the subcategory.

View solution in original post

8 REPLIES 8

No problem. I think the onLoad does not trigger the Advanced reference qualifier to recalculate.

You have 2 options:

  • Duplicate the variables and use the duplicates with default value for this form.

Or

  • Create a Script include that returns the Reference qualifier based on the subcategory.

Thank you!  I think the script include may be my option.  I will let you know how it goes.

The script include did in fact work.  I just have another issue that I submitted a new question for.

I would have used duplicate variables, but it becomes a problem in reporting.