How to change list values based on another list.
This example shows how to populate a list box or drop-down based on the values in another list. It’s one of the most frequently asked questions I see and it’s one with multiple great responses; this one is just how I’ve chosen to approach the problem. The code to my solution is contained in one field and requires minimal editing.
The line below is where you reference the dependent list.
The section below is where you store the items for the dependent list. Each property of the dependentListValues object must correspond to one of the export values of the master list. The value of each property must be either an array in which each element is either a string or an array. If the element is a string, the user and export values for the list item are equal to the string. For an element that is an array, the array must have two string elements, the first is the user value, the second is the export value. If the master dropdown allows user input and that property isn’t found in the dependentListValues object, the dependent dropdown will be emptied.
After editing these two sections, the script is ready to be added to your field.
For a list box, add the script to the selection change tab.
For a combo box, add it to the custom format script.