Expand my Community achievements bar.

Is it possible to pull a portion of a field into a barcode?

Avatar

Level 1

I have a lot # that is entered on the form as "LOT#ISANL100518"  I need to create a barcode but the "#" obviousily will not read.  Is it possible for me just to pull the last 11 digits into the barcode?

Or is there a better solution where I can preset a prefic "LOT#" on my field.

Any help would be appreciated.

2 Replies

Avatar

Former Community Member

The # character should be readable by any barcode decoding device (hardware or software) so you shouldn't need to worry about.

If you wish to remove the prefix 'LOT#' it can be done with the following script attached to the exit event of the respective text field.

// form1.page1.tf1::exit - (JavaScript, client)


var lot = this.rawValue;

this.rawValue = lot.substring(4,lot.length);

Steve

Avatar

Level 4

I agree with Steve's response, but if you don't have static positions of the # symbol, I'd do a lot.substring(lot.instanceOf("#"), lot.length);

Just a little re-assurance for data integrity