Reference Qualifier on Multi Row Variable Set

fogesmoges
Tera Expert

I would like to use a multi-row variable set to display a list of users. I have one variable in the MRVS called “selected user” which is just a reference to the customer_contact table.

I would like to know how we can apply a dynamic reference qualifier/filter to this field, based on a variable in another variable set, called 'account'. Unsure if this needs to be done in the reference qualifier on the variable or if it can be updated via onChange client script. I have tried the following reference qualifier to no avail (note the part in the else{} clause is the part that isn't working);

javascript:if(gs.getUser().getCompanyID()!="ourcompanysysid"){'account=' + gs.getUser().getCompanyID()} else {'account'=current.variables.account} 

I've read that "Variables that are not included in a multi-row variable set cannot be used in dependent reference qualifiers for variables in the multi-row variable set. Similarly, the variables included in the multi-row variable set cannot be used in dependent reference qualifiers for variables that are not in the multi-row variable set. For a reference qualifier, the current row is the one that is being edited."

But this just seems backwards to me, why make a variable that you can't manipulate? I'm really impressed with the way the MRVS works for selecting multiple records, its just difficult that we cant lock off this field.

Has anyone used this feature in this way before, or do you have any ideas for being able to dynamically filter reference fields in a MRVS? We are able to restrict a list collector variable on the record producer, though this variable type looks a bit clunky in the portal, and I'd prefer to not use it. I wonder if there is another way to achieve the same UX as the MRVS.

 

If you need more information please let me know.

7 REPLIES 7

Alikutty A
Tera Sage

Hi,

Unfortunately it is design drawback of MVRS that you cannot access any variables that are outside of the MVRS inside it. The MVRS opens like a popup window but it does not allows you to access any variables from its parent window ie the catalog item variables. 

You could do the reverse ie the variables within MVRS can be accessed within your catalog item as a JSON object.

Thanks

Hi Alikutty,

I have same requirement.

Is there any workaround for achieving this?

 

Legarth
Giga Contributor

Hello, we just solved something similar by pushing the variable value to the current session (OnChange client script in the variable set). From there you can call it in a reference qualifier in the multirow VS. 

Hi, how do you get this working? I'm trying to make it works calling, onChange of my catalog item variable, setting a session var calling a GlideAjax script (because i can't set it directly from the client script, right?).

Then, trying calling it from the ref qualif in the multirow VS, it seems not working at all.