Copy link to clipboard
Copied
Created a dropdown with the javascript code below. Regardless of what the user selects, the displayed value returns to the first option in the list. I have no idea what I am missing or have done wrong.
this.getField("Dropdown").setItems([" ", "Not Applicable", "Code A - Child was never determined eligible for Early Steps and did not have\nan IEP.", "Code B - After Early Steps provided personally identifying information to the\nschool district, child/family could not be located by the school district\n(after repeated contact attempts).", "Code C - School district did not get consent from the family for Part B evaluation\n(or family withdrew consent.)", "Code D - Early Steps shared identifying information with the school district less than\n90 days before the child's third birthday.", "Code E - Process was delayed until after the child's third birthday due to\nparent/family reasons (e.g., parent/family repeatedly did not bring child to evaluation,\nparent/family repeatedly did not attend eligibility meetings, child/family illness)", "Code F - Process was delayed until after the child's third birthday due to\nincomplete medical or other agency reports (DCF) needed for eligibility\ndetermination (does not include school district delays in arranging medical\nevaluations).", "Code G - Child was evaluated prior to third birthday and determined ineligible for\nPart B services.", "Code H - Parent declined the transition conference, eligibility meeting or Part B\n services (even if child was evaluated and eligible for Part B). ", "Code I - Child moved out of the school district prior to evaluation or\neligibility determination or never enrolled in school district after being determined\neligible for Part B services.", "Code J - Natural Disaster (e.g., hurricane).", "Code K - Other: (see below)", "Code L - Child unknown to school district or not referred by Early Steps."]);
Copy link to clipboard
Copied
Thank you for the feedback. The issue has been resolved. Once I renamed the field the value no longer resets itself.
Copy link to clipboard
Copied
Is this script resetting it's own entries? If so, then of course the field value is also being reset.
Making a dropdown field change it's own set of entries is tricky. The "setItems" function makes the first entry in the list the default and the current value.
So what is it you are trying to do? Perhaps there is a better way.
Also, when you ask questions about scripts you need to provide complete information. For example, where is this script placed. We need to know name of the field it is placed on, and the type of script, validation, format, calculations. As well as the name of any other fields the script is supposed to affect. This information is very important for understanding the issue.
Copy link to clipboard
Copied
Thank you for the feedback. The issue has been resolved. Once I renamed the field the value no longer resets itself.