5 Replies Latest reply on Nov 28, 2016 9:23 AM by Dzedimainas

    value from two dropboxes in one text field

    Dzedimainas

      Hi,

       

      I've been searching for a solution for this for two days....

       

      Basically, I have dropbox01, dropbox02, and textfield01. I need to get the choices from both of the dropboxes into one textfield.

       

      At the moment I have in textfield01 custom calculation:

       

      var v = this.getField("dropbox01").value;

      if (v=="Choice01") event.value = "some text" + getField("textfield02").valueAsString + "some text"; 

      if (v=="Choice02") event.value = "some text" + getField("textfield02").valueAsString + "some text";             

      if (v=="Choice03") event.value = "some text" + getField("textfield02").valueAsString + "some text"; 

       

      var z = this.getField("dropbox02").value;

      if (z=="Choice01") event.value = "some text" + getField("textfield03").valueAsString + "some text"; 

      if (z=="Choice02") event.value = "some text" + getField("textfield03").valueAsString + "some text";             

      if (z=="Choice03") event.value = "some text" + getField("textfield03").valueAsString + "some text"; 

       

      Here textfield02 and textfield03 are just field with some info in them.

       

      I can get only one of the choices in this textfield. I've tried &&, or, ||, but none of them work the way I want. I just want "Dropbox01" + "Dropbox02".

       

      Thank you in advance for your help.