Skip to main content
Participant
November 1, 2016
Question

How to get a number with a dash to not calculate?

  • November 1, 2016
  • 6 replies
  • 527 views

I have a form that has some chemicals listed. I need the EPA # to automatically fill in when I make a choice from a drop down menu. That is working. Some of the numbers have a dash in them such as 111-1. The filled in field then puts in the number 110.

I need it to stay as 111-1.

This topic has been closed for replies.

6 replies

try67
Community Expert
Community Expert
November 1, 2016

Are you using a script to populate the field? If so, post the full code.

Participant
November 1, 2016

if(event.willCommit)

{

console.println(event.value);

  switch(event.value)

  {

  case "Captain XTR":

  this.getField("EPANumber1").value = 67690-9;

  break;

  case "Cutrine Granular":

  this.getField("EPANumber1").value = 8959-12;

  break;

  case "Clipper":

  this.getField("EPANumber1").value = 59639-161;

  break;

  case "Reward":

  this.getField("EPANumber1").value = 100-1091;

  break;

  default:

  this.getField("EPANumber1").value = 0;

  break;

  }

}

Participant
November 1, 2016

The resulting field for Captain is 67681.