update values in list collector based on reference field value

Jube
Tera Contributor

Hi,

 

Im struggling with creating script which would clear field and update with correct value based on previous selection.

The use case:

Field in form which is reference type, it filters companies, then there is list collector which picks up access right groups depending on selected company. My goal is when company is changed to something else , it clears values from list collector from previous selection and updates with newly selected company access right groups. 

I have read this shouldnt be done with onchange script but reference qual instead. I have tried to add this script to one of the list collectors 

current.variables.access_to.install_status = 1 ^ current.variables.access_to.sys_id;

but it still does not update values in list collector accordingly after company has been changed.

 

Any ideas?

 

Thank you! 

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Are you viewing this in the native UI as a slushbucket with 'Available' and 'Selected' boxes, or in Service Portal / ESC that looks like a table list field with the lock icon?  In either case a reference qualifier can update the list of records that can be selected, but you would (also) need an onChange script if you want to affect the value/selected records when company changes.  You have a reference variable on the company table named 'access_to'?  What is the name and list table of the list collector?