Form field with calculated default value フォローする

0
Avatar
Graham JENKINS

I have a requirement to produce a quantity of identical labels, one for each box in which a standard quantity of articles is packed.

In my first template, I have a Works Order with the number of articles and the quantity per box, so I can calculate the number of labels required. As there may be a need for extra labels, I have the operator type the number of copies he requires.

My second template covers the case where no Works Order is available, so the operator selects the article from the database (which retrieves the quantity per box) and types the number of articles.

I am having difficulty in even getting the calculated quantity to display on the form. Ideally, I would like this to be the default number of copies, which could then be altered.

I am using BarTender 2016 R9 Automation edition.

3 コメント

0
Avatar
Pete Thane
コメントアクション Permalink

I do not think it is possible. 

The VB can only be processed at certain times during the printing process (see the Event Controlled Scripts, such as OnNewRecord or OnPostPrompt) and there is not an option to run the script whilst displaying the prompted/Data Entry screens, which is what you need to.

With the script set to run either as OnPostPrompt or OnIdenticalCopies then you can configure BarTender to autoamtically calculate and print the number of labels but you cannot see this calcualted number as one of the values is being entered manually via the Data Entry screen input 

 

0
Avatar
Graham JENKINS
コメントアクション Permalink

Pete,

Thanks for your reply.

Just one of those frustrating things. Perhaps I should look at using the API from VB.

0
Avatar
Pete Thane
コメントアクション Permalink

I remember doing something like this in the past and we ended doing the calculation in the background and adding on a couple of extra labels each time to allow for spoilage etc. 

You could do something similar or even have an box on your label to ask how many extras the users want and then add this by VB to the formula that calculates the number of copies. 

You maybe be able to use an Action on a data entry form on a non printing label) in which the user chooses the product, and then the Action performs the VB to calculate the number of copies. Once completed this then triggers the opening of a your actual label to which is passed through the database look up value as well as the VB calculated number of labels with this being then set default value for a manual entry field for the label.

Pete

サインインしてコメントを残してください。