Can I set a Reference Qualifier Condition in a Catalog Client Script?

Joe Weisiger
Giga Expert

Hello,

I am creating multiple catalog items which all use a shared variable set.  I am looking for a way to set a Reference Qualifier Condition via a Catalog Client Script.  Is this possible and if so how do I code it?

Thank you,

Joe

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hey,

sorry, my bad - add after line 17 one more "}" - the entire method is not actually enclosed hence we get this error.

 

Joro

 

P.S. Sorry for the delay - my actual email is not the one pointed in my account so I dont get notifications (and I cant change it sadly)  😞

View solution in original post

16 REPLIES 16

Community Alums
Not applicable

Hey Joe,

why from client script? Use script include with the relevant paramaters and use the refQual as usual - javascript: new YourRefQualInclude(params here)

 P.S. Otherwise its possble via client script but to me - very bad idea

Cheers,

Joro

Community Alums
Not applicable

Share a bit more light on your requirement, lets find better solution here

Joe Weisiger
Giga Expert

The variable is "Employee Name" and I need the condition to only display employees in a certain company.

 

The reason for a catalog client script it so I can define the reference qualifier condition in each catalog item, using the shared variable set.  If there is a better way using a script include that would work as well. 

Community Alums
Not applicable

Ok,

I get your point. But, first - you can use the Cat item's User criteria (sc_cat_item_user_criteria_mtom table) to allow/not allow for one to see those (in your case by company I do believe). Or any condition you might seem fit.

Then just use same RefQual for the entire set - it's already filtered once. Also you can use script in the UC :
find_real_file.png