generate/cbs2.gifGet Stock ID Script (R-GETID.MAC)


 

The script file must be located in your CAPITAL program directory and must have the file name R-GETID.MAC.

This hook script can be used to tell the Warehouse Manager what the stock ID of a stock item is, based on its bar/scan code. The stock item's Stock ID is a unique 7 digit code automatically assigned to every product in the CAPITAL Stock Control system. This is useful when you need to translate a complex bar/scan code, which may not correspond directly to any field within the CAPITAL Stock Control system, without additional formatting.

Entry Values

Variable

Purpose

Stock->X

You may query the contents of the fields of the stock record.

Staux000->X

You may query the contents of any user fields if applicable.

mBarCode

The stock item's bar/scan code.

Return Values

The script must return the stock ID of a stock item. Return an empty string ("") if the item's Stock ID could not be found. This will cause a "not found" warning message to be displayed in the Warehouse Manager.

Example

* Locate the stock item based on the item's bar/scan code

* Only digits 3-13 make up the bar/scan code

mBarCode := Substr(mBarCode, 4, 10)

Stock->(Find(mBarCode))

Return StockID()

____________________________

Related Topics:

Script Programming

Warehouse Manager Data Collection Scripts



Help Topic Map