Trouble with setting dropdown (combo) field values from text field inputs
Hello helpful people!
I have been flummoxed by this problem all afternoon. I would like to have the user enter data into 5 fields named Result1, Result2, etc and for their answers to be ported to ResultDropdown1, ResultDropdown2, etc (5 total dropdowns, all populated the same way, but user can select different things from them).
this.getField("SkillDropdown1").setItems(["(choose one)",this.getField("Skill1").value,this.getField("Skill2").value,this.getField("Skill3").value,this.getField("Skill4").value,this.getField("Skill5").value]);
This code works as a custom calculation script to populate them. However, if I try to select an answer when testing, it reverts to the default of "(choose one)". Choosing "commit value immediately" doesn't seem to have any effect.
If I move this code into a custom validation instead, the whole program hangs with the weird keyboard looking icon taking over the mouse pointer and I have to force close.
I tried moving the custom validation code into one of the Results fields, but while it populated the "(choose one)" selection, the remaining selections did not push their values into the dropdown.
Any guidance? Perhaps a document-level script? How would I set that up if it's something other than just "paste the code as-is into the document level script editor"?
Thank you!
