Copy link to clipboard
Copied
Hi There
I have created this validation that runs from a dropdown i.e. North of Tyne, South of Tyne, etc...
When the colleague selects North of Tyne the "Probation Office" Drop-down Field successfully shows Ashington, Berwick-upon-tweed, Newcastle and Wallsend - So far so good!
However, whenever a colleague selects anything other than "Ashington" and presses save, this field always resets to ashington.
It is reverting back to the first value in the dropdown for all of these lists and I wonder if it is due to the validation in the first field or the options in the 2nd field?
Thank you so much for your help, I am new to Adobe and this is my first community post.
if (event.value=="North of Tyne" && this.getField("Probation Office").getItemAt(0) != "Ashington")
this.getField("Probation Office").setItems(["Ashington", "Berwick-upon-Tweed", "Newcastle", "Wallsend"]);
else if (event.value=="South of Tyne" && this.getField("Probation Office").getItemAt(0) != "Sunderland South")
this.getField("Probation Office").setItems(["Sunderland South", "Sunderland North", "Gateshead"]);
else if (event.value=="Sheffield and Barnsley" && this.getField("Probation Office
...
Copy link to clipboard
Copied
if (event.value=="North of Tyne" && this.getField("Probation Office").getItemAt(0) != "Ashington")
this.getField("Probation Office").setItems(["Ashington", "Berwick-upon-Tweed", "Newcastle", "Wallsend"]);
else if (event.value=="South of Tyne" && this.getField("Probation Office").getItemAt(0) != "Sunderland South")
this.getField("Probation Office").setItems(["Sunderland South", "Sunderland North", "Gateshead"]);
else if (event.value=="Sheffield and Barnsley" && this.getField("Probation Office").getItemAt(0) != "Sheffield")
this.getField("Probation Office").setItems(["Sheffield", "Barnsley"]);
else if (event.value=="North East Lincolnshire" && this.getField("Probation Office").getItemAt(0) != "Grimsby")
this.getField("Probation Office").setItems(["Grimsby", "Scunthorpe"]);
else if (event.value=="Doncaster and Rotherham" && this.getField("Probation Office").getItemAt(0) != "Doncaster")
this.getField("Probation Office").setItems(["Doncaster", "Rotherham"]);
else if (event.value=="Hull and East Riding" && this.getField("Probation Office").getItemAt(0) != "Hull")
this.getField("Probation Office").setItems(["Hull", "Beverley", "Goole", "Bridlington"]);
This has now been fixed, using this code: