6 Replies Latest reply on Jan 8, 2015 7:06 AM by MICWAR

    select listvalue and autopopulate formfield

    MICWAR
      Hi, hope someone can help me with this one.
      I need to select a value from a List and then populate another Formfield with a specific value depending on what i select in the list, in this case e.g. number 1995 if i select value "12" in the selectionlist the "Formfield_1" should be populated with the value 1995 and if i select value "18" in the selectionlist, the "formfield_1" should be autopoulated with the number 2995  i, how do i resolve this?

       

       

       

      example:

      var a = this.getField("SelectionsList").value = 12;

       

      var b = this.getField("SelectionsList").value = 18;

       

      var c = this.getField("Formfield_1").value;

       

      if( a = "12") event.value c = "1995";

       

      if( b = "18") event.value c = "2995";

       

      As you can se i have difficulties to understand how i get and populate the value in var c

      i have chosen to run this as a calcutlation from the properties tab "Format" and Custom keystrokescripts in the selectionsList, maybe it shouldnt be placed there at all?, i want it to do the calculations when a selection is done via the SelectionsList