Data From Prompt And Database S’abonner

0
Avatar
Legacy Poster

Hello,

 

I am fairly new to visual basic but I do have some background to coding. 

 

I have a question concerning using data from a text input in the prompt, data imported from a data base and a check digit function.  Right now I have an input in the prompt asking for lot code data.  I also have a barcode pulling data from a data base.  For the other barcode on the label I need to have the prefix "+$" followed by the lot code, followed by the 15th character in the other barcode (from the data base), followed by a modulus 43 check character for the entire script.  If need be I could create a seperate column of data in my data base to pull out the 15th character. 

 

In simple terms what I'd like is:

 

"+$"    get(text 48)    get(barcode 1, character 15)    Func(mod43)

 

 

If anyone would be able to help me out with this I would be very greatful.

 

Thanks,

 

Bill

4 commentaires

0
Avatar
Fernando Ramos Miracle
Modérateur
Actions pour les commentaires Permalien

Hello TitanSp,

 

If I understand correctly you wish to build a barcode with four different data sources:

 

First data source will contain a prefix ("+$").

 

Second data source will contain the data entered in the Data entry form.

 

Third data source will contain the 15th character of a database field (it's easier to get it directly from the database field instead of having the barcode get it from the database field and then take the value from the barcode).

 

And finally the fourth data soruce will contain a check digit using the value of the previous two data sources (I'm guessing that you don't wish to use the prefix).

 

To get this done:

 

1. You'll first need to give a name to the second data source to be able to reference it from a VB script code.

 

2. The second database needs to be linked to the prompt control from the data entry form, being of the type "Embedded data" (in older versions it was called "Screen data").

 

3. The third data source will need to be of the of the type VB Script. To make sure it works at the proper time, set it as "Event Based" and in the "OnNewRecord" event write the below code:

 

Value = Mid(Field("<FieldName>"),15)

 

4. The last data source will be a data source of the same type as the third (event based VB Script) and in the same event you'll need to enter the below code:

 

Dim prompt, database

 

prompt = Format.NamedSubStrings("PromptDataSourceName").Value

 

database = Mid(Field("<FieldName>"),15)

 

Value = UccMod10(prompt & database) 

 

I'm creating two variables, storing the value of the second data source from your barcode in the first one (prompt), and the 15th character from your database field in the second one (database). I then call a "modulus" check digit function concatenating both variables.

 

*I've coloured in red the values you'll need to modify. Regarding the check digit function, we've got many of them in our script assistant, I'm using only one of them. Please verify that you get to use the correct one.

 

**Also note that in our Help documentation you'll find instructions on how to create a check digit through VB script, both using our predefined functions and creating a fully custom one.

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

How to create a data base for a sandwich label.
Product names-use by date- ingredients paragraphed- barcode-price-batch code as a prompt.
Thanks,
Slow Genius
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

How to create a data base for a sandwich label.
Product names-use by date- ingredients paragraphed- barcode-price-batch code as a prompt.
Thanks,
Slow Genius

0
Avatar
Fernando Ramos Miracle
Modérateur
Actions pour les commentaires Permalien

Hello Slow Genius,

 

I'm not sure what you are asking for here, do you need help with your design? If that is the case what exactly do you need?

 

*Note that although we can certainly help you with any problem you encounter while designing your document, we cannot design the label for your.

 

Regards.

Vous devez vous connecter pour laisser un commentaire.