How to populate two text fields based on a single drop down list selection
I'm trying to set up a form so that two text fields will populate with a default text (separate text in each text field) at the same time.
Below is a screenshot of the fields.
So, for example, if I select Utah (from 14 options) from the drop down menu in "State," "OH Fund Center" will auto-populate with APWSWR4949 and "OH WBS" will auto-populate with FR49.73.
Here is the script I have been using in the Calculate tab in Properties for the OH Fund Center box:
var v1 = this.getField("RecState").valueAsString;
if (v1=="Colorado") event.value = "APWSWR0808";
if (v1=="Idaho") event.value = "APWSWR1616";
if (v1=="Montana") event.value = "APWSWR3030";
if (v1=="Nebraska") event.value = "APWSWR3131";
if (v1=="Nevada") event.value = "APWSWR3232";
if (v1=="New Mexico") event.value = "APWSWR3535";
if (v1=="Oklahoma") event.value = "APWSWR4040";
if (v1=="Oregon") event.value = "APWSWR4141";
if (v1=="South Dakota") event.value = "APWSWR4646";
if (v1=="Tennessee") event.value = "APWSWR4747";
if (v1=="Texas") event.value = "APWSWR4848";
if (v1=="Utah") event.value = "APWSWR4949";
if (v1=="Washington") event.value = "APWSWR5353";
if (v1=="Wyoming") event.value = "APWSWR5353";
else event.value = "";
It is not working. I'm at a loss on getting this to work, before I can figure out auto-populating the OH WBS box.
Also, I need both the OH Fund Center and OH WBS boxes to clear/change if a new state is selected.
Any help would be greatly appreciated.
Thanks.
Crystal

