Help with an Advanced Reference Qualifier on catalog item variable

jlaue
Kilo Sage

Hello - 

I have a functioning advanced reference qualifier on a Catalog Item variable, however I need to add a few more conditions to it.  I am pulling a different variable on the catalog item within the qualifier along with only pulling active records.  This is on the sys_user table.

Here is what I have that is properly working:

javascript:'location='+current.variables.location+'^active=true';

I need to also exclude a specific location and also exclude any users without a location value.  

I tried this, but it is not working:

javascript:'location='+current.variables.location+'^active=true^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY';

I have also tried:

javascript:'location='+current.variables.location+'^active=true'+'^location!=bd9abf38dbeec45086313e04399619ea'+'^locationISNOTEMPTY';

Hoping someone can help with how I should structure this.

Thanks!

1 ACCEPTED SOLUTION

Can you try this: javascript:(current.variables.location ? 'location=' + current.variables.location + '^active=true' : 'active=true ^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY');

View solution in original post

7 REPLIES 7

Willem
Giga Sage
Giga Sage

Have you set the Attribute ref_qual_elements? You need that in order for the Reference qualifier to work.

ref_qual_elements=location

 

 

You can add the Attribute to the Reference variable like so:

find_real_file.png

 

Willem
Giga Sage
Giga Sage

I see you have the simple version working. What is not working on the advanced one? Is it showing the location you are trying to exclude? Or not showing results?

Can you elaborate a bit more?

jlaue
Kilo Sage

Thanks for the response!   It is not returning anything.  I think I understand why now.  The variable field 'location' within the catalog item may be empty.  So I think the first one is working because it just seems to ignore that since the variable has no value and show all the Active users regardless of location.  This is what I want though, but I want to trim down that list a little more.

When I try to add the extra parameters to show All Active users when the location variable is empty, but then attempt to filter out users that don't have a location value and exclude one particular location it is blowing up.  

I think I will need to come up with a different approach.

Can you try this:

javascript:(current.variables.location ? 'location=' + current.variables.location + '^active=true^location!=bd9abf38dbeec45086313e04399619ea^locationISNOTEMPTY' : 'active=true');

 

You want to show all active users when location is empty and use the filter when you have a value for location set right?