VB Script 追蹤

0
Avatar
Scott Rash

We need to multiply usercost1 * usercost2 and then take that value and add it to usercost3.

How can we do that with vb script in bartender?

 

3 意見

0
Avatar
Shotaro Ito
評論操作 永久連結

Dear Scott,

Name each data sources as usercost1, usercost2 and usercost3.

Create a text with VB Script data source. Select Multiline script.

Value = usercost1 * usercost2 + usercost3

 

 



0
Avatar
Steven H
評論操作 永久連結

Hi,

When I do this the printer no longer prints the label.  Here is my VB script

Value = Format.NamedSubStrings("TrackedItemNetWeightAndUom").Value / Format.NamedSubStrings("TrackedItemUnitsAndUom").Value 

Is it because they are different Unit of measure?  One is in Lb s and the other is in by units.

0
Avatar
Shotaro Ito
評論操作 永久連結

Check if there's any error message.
If the data contains "Lb" or "units" such as "10lb" ÷ "5units", that will cause error, so make input data to plain number like "10" ÷ "5".
You could filter out non numeric value by Datasoruce's transform tab > character filter.

 

 

登入寫評論。