How can i prepopulate the rigth bucket of a list collector once a variable has changed

EricG
Kilo Sage

I've read many of the posts on how to remove selections from the right bucket of a list collector when a variables changes and can get it to work.

what i can't seem to get is how to populate the right bucket when a variable changes.

this is compounded further should the variable change again prior to submitting the form.

What i have is a list of Positions.  Next there is a Matrix table of Apps to Position.

On my form i have a Position Select box, this update the Reference Qual of the List collector to show only those apps to need for the position.  My users would like that "List" to automatically populate the right side of the list collector.

e.g. User selects Value 1  - List collector filters on this value and populates the right bucket automatically

Now user selects Value 2 -  list collector clears right bucket, requeires, then auto populates right with new values.

 

I'm not sure that this is the best action and would be open for another idea on how to show required programs for a given position

1 ACCEPTED SOLUTION

Very Very helpful and thank you for the "time out" explanation.  I was wondering if that was the issue, based on observations, and was thinking for putting a timed Loop wait condition in the code.

I'm going to try this now.  Thanks a lot.

View solution in original post

10 REPLIES 10

ok.  Hmmm. getting a error that myListCollector.reset() is not a function.

 

 

Hi,

I have a blog around this; please check below

Dynamically set list collector on change of variable

Don’t forget to Mark blog as Helpful, Bookmark if it helps

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

OK, I'm half way there

 

I have the script include and the Client script working to 

1. Populate Left Side with New Values based on Variable 1

2. Right Side clears old values and updates Left side if Variable 1 changes.

 

Is there a way to automatically move the Left side values to Right side?

or maybe just make rigth not visible.