How can I make checkbox answers as dropdown list entries?
Hi all,
I am trying to create a dropdown list with its selection generated from checkbox answers. For example if I tick 5 checkbox, the 5 answers from the checkbox will auto populate the dropdown list entries. I have attached the picture below to give an example of what I meant:
I have tried using the script below to do this but it doesn't work.
// Get the dropdown field
var dropdown = this.getField("Root Cause");
// Get the checkbox field
var checkbox = this.getField("Low learning aptitude");
if (checkbox.value === "Yes") {
var isOptionExists = false;
for (var i = 0; i < dropdown.numItems; i++) {
if (dropdown.getItemAt(i).value === optionValue) {
isOptionExists = true;
break;
}
}
if (!isOptionExists) {
var count = dropdown.numItems
dropdown.insertItemAt("People - Low learning aptitude","People - Low learning aptitude");
}
}
If anyone can help it would be much appreciated!
