Scripting Variables Based on Control Names

               

Expand/Collapse all Show/Hide All

Note This topic applies only to the Job Cost, Material Requirements Planning, Payroll, Time Card, and Work Order modules.

Note This topic does not apply to Sage 100 Premium.

For modules that do not use object-oriented architecture, the names of the panel controls are used as "variable" names in script data references. All available data references for a panel are listed in the data references list box in the Edit Script window.

Variable names are based on the control name, typically followed by the dollar sign ($). Variable names ending with $ contain text data. Most data references that contain numeric information also end with $ because the numeric information is stored in text form. Some data references that are strictly numeric do not end with $.

Expand/Collapse item  Examples

If the panel control ML_NAME contains text value "GEORGE":

{ML_NAME$}.BMP yields GEORGE.BMP

Insert [ML_NAME$]+Chr$(10) yields Insert "GEORGE"+Chr$(10)

You can reference a portion of the data by specifying the starting position and the length of the data you want enclosed in parentheses.

[ML_NAME$(1,3)] yields "GEO"

[ML_NAME$(2,5)] yields "EORGE"

If the data is shorter than the range specified, no value is passed for the entire data reference. To make sure that at least spaces are returned, use the PAD function.

If the panel control ML_NAME contains text value "GR":

[ML_NAME$(1,6)] yields a null string ("") because the data is shorter than 6.

[PAD(ML_NAME$,6)] yields "GR      ".

 

For more information, see:

Scripting Variables

Scripting Variables Based on Business Objects

 

© Sage Group plc 2019. Privacy Policy | Copyright/Trademarks