
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:23 AM
Hi,
In a record producer I have two lookup select box variables. A variable called 'Category' and another called 'Subcategory'. Both variables are set to do a lookup from table sys_choice and are mapped to the fields matching their names.
In the 'Subcategory' variable I have this reference qualifier:
javascript: "name=incident^element=subcategory^dependent_value=" + current.variables.category;
It makes sure that when a specific category is selected in the 'Category' variable, it is only possible to select subcategories that are dependent on the selected category. It works as expected.
Now I got a requirement, that the Category choices should be ordered by their sequence number, and alas it is not possible with a lookup select box according to Dependent variable of type "lookup select box" does not honor ORDERBY on reference qualifier in Serv... Then I thought that I could just change the 'Category' variable to a reference type variable with a reference to the sys_choice table - where it is possible to order them by their sequence number - but then the dependent script thing on the lookup select box 'Subcategory' variable does not work anymore, and changing the 'Subcategory' variable to a Reference type variable too does not work either.
I have tried the fairly new Auto-populate option on the subcategory variable set to dependent question: 'Category' but no matter what dot walk path on the sys_choice table I choose, it does not seem to work.
Do you know how the reference qualifier script should be configured in the 'Subcategory' variable if both variables is set to reference type variables _and_ the subcategory choices must be dependent of the selected 'Category'?
Best regards
Thomas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:28 AM - edited ‎11-01-2023 02:29 AM
Hi @Thomas G ,
You can keep the type of subcategory as lookup selectbox only n just try by modifying the reference qualifier.
javascript:"name=incident^element=subcategory^dependent_value=" + current.variables.category.getDisplayValue();
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:28 AM - edited ‎11-01-2023 02:29 AM
Hi @Thomas G ,
You can keep the type of subcategory as lookup selectbox only n just try by modifying the reference qualifier.
javascript:"name=incident^element=subcategory^dependent_value=" + current.variables.category.getDisplayValue();
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:39 AM
Thanks Danish, but I see no choices in the Subcategory variable when testing the record producer on portal.
Best regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:42 AM
Hi @Thomas G ,
Can u let me know whether the value & label for category stored in sys_choice table is same or different.?
Thanks,
Danish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 02:46 AM
If it is different then can u try with this
javascript:"name=incident^element=subcategory^dependent_value=" + current.variables.getValue('category');