Reference Filed is not parsing the whole List Collector variable value in reference qualifier

Indraja Pandiri
Tera Contributor

Hi Team,

 

I have two variables on a catalog item "Group Request" 

 

1. Impacted Users (List Collector)

2. Main Assignment Group (Reference) "Reference Qualifier : javascript: new global.SIName.getAssignementgroups(current.variables.impacted_users)"

 

my requirement is when I select users from the "Impacted Users" variable it will call a script include written on the "Main Assignment Group" and filter out the groups which user is already a part of

 

for example: If I select user A and user B, user A is a part of "Snow1" but user B is not a part of "Snow1" so group "Snow1" should not be visible in "Main Assignment group" because User A is already a part of the group.

 

I am able to achieve this by calling the script include and eliminating all the groups users are a member of when the "Main Assignment group" variable type is "Lookup Select Box" but the same is not achievable if the type is "Reference" 

 

When the type of "Main Assignement group" is reference it is sending only one user "sys_id" from impacted users in the reference qualifer.

 

Kindly let me know why is this issue happening after changing the type to "reference" and solution for this

 

Thanks in Advance

3 REPLIES 3

Brad Bowman
Kilo Patron
Kilo Patron

The List Collector value will change with each selection, so after the first record is selected the value will be one sys_id, then when the second record is selected the value will be a comma-separated list of two sys_ids,...  The reference qualifier should run/activate each time the value changes.  If you can confirm in the Script Include logs that more than one sys_id is never received, then add an attribute to the reference variable

ref_qual_elements=impacted_users

which shouldn't be necessary in this case, but will ensure that the reference qualifier runs every time the list collector variable changes.  

If your Script Include logs show that you are receiving more than one sys_id, then we need to look at what that script is doing and returning to be sure it's what the reference variable is expecting. 

Is the List Collector variable list field sys_user, and the Reference variable referencing the sys_user_group table?

Hi @Brad Bowman  

 

Thank you for your repply, you are correct I have added the logs in script include it is only receiving one sys_id of the user, I have tried adding Variable attribute as have suggested on the "Main Assignment Group" still receiving only one sys_id.

 

Can you confirm on this I have added the variable attribute on the "reference variable i.e, main assignment group"

 

Regards,

Indraja.

Yes, that's the correct place, but you shouldn't really need that in this case.  I don't know if this matters, but you should have ...SIName().getAssign... in your reference qualifier. Otherwise, as long as the correct SI and function are being called, and logging the value of argument passed in from the reference qualifier shows something, I've never seen it show the wrong thing.  Is this in a PDI, or can you re-create it in a PDI to see if you get the same results?