6 Replies Latest reply on Oct 30, 2009 10:25 AM by evidal2

    How to run a script only if the field is not empty

    evidal2

      How to run a script only if the field is not empty

       

       

       

       

       

      Well thanks to you I got a full date on separate days, months and years in different fields. But now I have a problem, as PDF has several calculated fields with script if you enter the date as calculated by any of the other fields, which have separate date and undefinied makes me not want to put this to not always use this field. I tried to put a conditional if else but I sale.Esto is what I wear

       

       

      var datesol = event.value;//declaramos la variable

      if( datesol = " " ){

      this.getField('yearsol').value = " ";

      this.getField('monthsol').value = " ";

      this.getField('daysol').value = " ",}

      else {

      var array_datesol = datesol.split("/");// separamos esa fecha con la funcio split

      this.getField('yearsol').value = array_datesol[2];

      this.getField('monthsol').value = array_datesol[1];

      this.getField('daysol').value = array_datesol[0];

       

       

      With what they do not separate them now.

       

      Help please