- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 06:33 AM
Hi!
In the Portal, we have this requirement in the catalog form where we need to filter the List Collector choices (sys_choice table) based on the value selected in Reference field (practice_group table)
Example:
When Reference field selected "Group 1", the List Collector choices should be [ G1, G2, G3 ]
When Reference field selected "Group 2", the List Collector choices should be [ B1, B2, B3 ]
Can I do this filtering via reference qualifier in the Collector field?
Thank you for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 07:02 AM
Absolutely! On the sys_choice table in this example thus far, we are only using the dependent_value field, so the other fields like Table (name) and Element (element) can be anything in this case. To only show a subset of choices with the same dependent_value, you can use 2 different values in the element field - whatever you want them to be since this isn't used for anything else on these choices. If you populate the element field with 'client_role' on one or more choices, then your reference qualifier on the Client Role variable would look more like this:
Then populate the element field with something else for the Transaction Type choices and set the reference qualifier on that variable with that same value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 07:44 AM
If your sys_choice table has a field that is populated with the sys_id for 'Group1' in the Dependent value column on the records G1, G2, and G3 and so forth, then your reference qualifier would look like this:
javascript:"dependent_value=" + current.variables.ref_var_name
where : is replaced with the colon symbol, and ref_var_name is replaced with the name of your reference variable. Since this is a List Collector type variable, you will also want to add the variable attribute:
ref_qual_elements=ref_var_name
which will ensure that the list is updated when the reference variable changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2023 05:46 PM - edited 08-31-2023 10:10 PM
Hi @Brad Bowman
I tried using this in the List Collector field but upon testing and changing the Reference Value, the List collector displays "No matches found"
Reference Qualifier: javascript:"dependent_value="+current.variables.u_aol
Variable Attribute: ref_qual_elements=u_aol
Note that I have added the sys_id of the reference value on Dependent Value in sys_choice.
May I please ask for further assistance. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2023 05:01 AM
This is working for me in a mockup of this scenario. Please confirm that u_aol is exactly the name of the reference variable (no trailing space,...), that your reference qualifier looks like this:
and that you have added the sys_id of the record you are selecting in the reference variable on every applicable record in the dependent value field of the sys_choice table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2023 01:29 AM - edited 09-02-2023 01:42 AM
@Brad Bowman this is now working for one of the reference value.
How about if there are 2 List Collector fields (sys_choice table) that is based on the same value of the selected in Reference field.
These are the list collector fields that the choices should be based on the reference value (u_aol). These 2 fields have different choices but have the same dependent values.
I've tried to create a new sys_choices and add the dependent value of the same sys_id from 'u_aol'. But when I tested, these two fields copies the same choices because they have the same dependent values.
Can the reference qualifier be modified for this requirement? Thanks!