What Is The Correct Object Name Of The Barcode String? Follow

0
Avatar
Legacy Poster

I have a barcode that is based off text like this:

 

##  12345678  0812121212 A

 

I have 5 Human Readable text fields and for each of these I want to use a Single Line vb Command line to auto populate.

 

My text fields are

 

PartNumber - Text 1

SerialNumber - Text 2

Revision - Text 3

Date - Text 4

Title - Text 5

 

Format.Objects("Text 1").Value = Mid(Format.Objects("Barcode 1").Value,5,8)

 

I would expect that this would populate my Text 1 (PartNumber) text field with 12345678 but instead I get 0

 

I do not fully understand what the correct object name is for the string that is used to create the barcode.  I have to basically do this for 4 of the 5 text fields.  The 5th one will come from a database I think.

 

Thank you.

 

 

 

 

 

 

1 comments

0
Avatar
Legacy Poster
Comment actions Permalink

I also get 0 but it does work correctly when changing the Script Type to "Event Control Scripts" and then pasting it into OnAutoSelectedEvent.

 

However, if you intend to add this script to each object, you don't need to assign the value explicitly to the object, or rather, it doesn't work anyway. Instead just use Value =

Value = Mid(Format.Objects("Barcode 1").Value,5,8)

Please sign in to leave a comment.