Skip to main content
lambo99
Participating Frequently
March 27, 2017
Answered

Create a drop down from a result

  • March 27, 2017
  • 1 reply
  • 841 views

I am trying to create a multiple option dropdown from a result in a previous box.  for example.  if you select "740" then you have can 1/2,3/4, or 1.0  if you select "560" then you can have 1.25, 1.5, or 2.0

var v1 = this.getField("Series").value;

if (v1 == 740) {

    event.value = "1/2,3/4,1.0";}

only the 1/2 shows up and i need all three to be an option to select.

This topic has been closed for replies.
Correct answer try67

in the calculate section of the drowpdown box named "Series"


You need to use the Validation event. The Calculation event is triggered whenever the value of any field is changed.

So you would just keep re-applying the values to the fields if you do it like that...

1 reply

Bernd Alheit
Community Expert
Community Expert
March 28, 2017

For dropdown lists you must use setItems.

lambo99
lambo99Author
Participating Frequently
March 28, 2017

I used this statement and it creates a dropdown but it does not allow me to select anything other than my first option of "1/2-D"  if i try to select something else it reverts back to "1/2-D"

switch (event.value) { 

case "740": 

this.getField("Inlet").setItems(["1/2-D","3/4-D","1.0-D","1/2-E","3/4-E","1.0-E","1.25-E","1.0-F","1.25-F","1.5-F","1.25-G","1.5-G","2.0-G","2.0-J","2.5-J","3.0-J"]); 

break;}

try67
Community Expert
Community Expert
March 28, 2017

Where did you place this code, and what's the full code?