OnChange Client Script to Populate List Collector

Steven Parker
Giga Sage

So I am playing around in my personal Dev instance and trying to populate a list collector with a few values based on the choice in a Select Box variable:

find_real_file.png

How can I populate multiple values in the right bucket of a List Collector when a Select Box is changed (job_function in this example) to a certain value?   This works for populating 1 value, although it throws up a JavaScript error in the Service Portal which is obviously an issue.   I know the values that need to go in the right bucket when a value is chosen in the select box so I just want to manually populate those 3 or 4 values when the job function is changed to "fsr".   Also, what is causing the JavaScript error on the Service Portal?


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
10 REPLIES 10

Neha,



We went a slightly different direction and had each department define the job roles down to each application.   Then we created a "Job Role" column on our application table and populate that column with the various job roles (FSR and Teller for example).   Once someone selects "New Hire" on our Access Request item and then chooses a job role on the form, we have a run script that runs and will read the application table for each application that has that Job Role associated with it, then creates a task for the assignment group of that application.



This way nobody has to know what apps each job role receives.   We also don't even display the apps that job role is receiving so the list collector population was no longer a requirement.   We have knowledge articles around each job role if someone wants to know what apps each role is receiving.



Please mark this response as correct and/or helpful if it assisted you with your question.
Steven