How to either remake my drop box or remove duplicates?
Currently I have a set of six text fields that randomly generate a number. Lets call the A1, A2, A3, A4, A5, and A6.
I have a drop down menu where I want to populate with options based off the values of the text fields.
Option A will always be present. Option B is only present if A1 or A4 is above 10. Option C is only present if A2 or A6 is above 10. Option D is only present if A3 is above 10. Option E is only available if A5 is above 10.
The way I have it setup now will create doubles if A1 and A4 are both above 10 or Option C if A2/A6 are above the threshold.
var cDrop = ["-Select-", "Option A"];
var fields = ["A1", "A2", "A3", "A4", "A5", "A6"];
var drop = ["Option B", "Option C", "Option D", "Option B", "Option E", "Option C"];
for (var j = 0; j<fields.length; j++) {
if (Number.this.getField(fields[j].valueAsString) >= 10) {
cDrop.push(drop[j]);}}
this.getField("Dropdown Menu").setItems(cDrop);
