Copy link to clipboard
Copied
Good evening, I am attempting to access a drop down list, however, I can't seem to change the value of the Drop down box within JS. Here is my code:
var ListOne = this.getField("relationship.0");
var search = ListOne.getItemAt[1];
console.println(search.value);
I can print out the current value that's set in the drop down list, but I can't set it to, "Mother" or, "Brother."
Any help would be greatly appreciated!
Your code contains multiple errors, but at any rate you can't set the value of a specific item in the list, only the entire list as a whole, using the setItems method.
Copy link to clipboard
Copied
Your code contains multiple errors, but at any rate you can't set the value of a specific item in the list, only the entire list as a whole, using the setItems method.
Copy link to clipboard
Copied
Works grand now, here is an example of the code that works as intended:
var ListOne = this.getField("relationship.0");
ListOne.setItems(["Brother from another Mother"]);
console.println(ListOne.value);
Simple as that, thank you.