2 Replies Latest reply on Jun 17, 2010 9:51 AM by JimBob96

    If Statements for Combo Boxes

    JimBob96 Level 1

      I'm trying to create a combo box with values that are determined based on a separate combo box. So for example, say the first combo box contains multiple manufacturers. Once a manufacturer is selected, the combo box below it that contains model numbers updates for that specific manufacturer.

       

      I have limited knowledge of coding, but have been able to get some results.

       

      var f = this.getField("Model")

       

      if (this.getField("Manufacturer").value == "Company 1") {

      f.setItems([ ["Model A"], ["Model B"] ])

      }

       

      This code works so far as it does properly show Model A and Model B in the "Model" combo box. The problem is, when I try to select Model B, it defaults back to Model A.

       

      I hope this is clear enough.

       

      Thanks in advance for any help!