Globals.Actmask
Globals.Actmask returns the chart of accounts mask for your account numbers. Using the String.Transform() method will convert your account number into your formatted account number as a string.
Note: Globals are not available to Grid and External scripts until 17.02. Please check the scripting tree in the script window in Deacom to make sure Globals are available.
Applies To
Properties and Methods
None
Available
The .Actmask property is available in:
- 15.03.016
- All newer builds
Note: The .Actmask property and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
String
Syntax
Globals.Actmask;
Parameters
None
Example
//--Assuming the query will return 1000000
let lnAcct = Query.GetDecimal(`SELECT ch_Account FROM dmchrt WHERE ch_id = 1`);
//--Assuming the mask is 9999-9-99
let lcAcct = String.Transform(lnAcct, Globals.Actmask);
Event.Form.YesNo(`lnAcct: ${lnAcct}\nGlobals.Actmask: ${Globals.Actmask}\nlcAcct: ${lcAcct}`);
/*
Expected Prompt results:
lnAcct: 1000000
Globals.Actmask: 9999-9-99
lcAcct: 1000-0-00
If you use the exact script here, your values will be different.
*/