3 Replies Latest reply on Feb 7, 2018 12:42 PM by SIPRNet11

    Is a drop-down window considered a string?

    SIPRNet11 Level 1

      I ask this because I have and if/then statement set up where if a field has a keyword inputted, then when a submit button is pushed it will send an email to one of two groups.  I'm changing it because users are not "reading" the instructions and half the time, are not putting in the keyword when they should be so it's being emailed to the wrong group.


      So I want to change the "if/then" to a different field but that field is a drop-down menu and it doesn't work with the ".valueAsString.indexOf("Keyword") == 0.


      Here's part of what I'm working with:

      var keyWord = (this.getField("Org").valueAsString.indexOf("Company Name") == 0);

      if (this.getField("Signature").value != "" && keyWord == true) {

          this.mailDoc({bUI:true, cTo:sendTo, cCc:copyTo...


      I have to run this script in the Button Field.