AddStatementTransaction

AddStatementTransaction (ref, date, tofrom, desc, amt) Use this function to add a transaction to a bank statement import. The function only works when a Load Statement dialog is open, so can only be used from a statement loading script. Statement … Continue reading

Posted in Functions | Comments Off on AddStatementTransaction

TableAccumulateColumn

TableAccumulateColumn (table, key, columnNum, value) Accumulates the value into the specified column of a table. The table must already have been dimensioned to have sufficient columns. As of MoneyWorks 7.3, you can pre-dimension a table on creation by passing the … Continue reading

Posted in Functions, Uncategorized | Comments Off on TableAccumulateColumn

ImportImage

ImportImage (tablename, key, path) ImportImage() loads an image file and attaches it to a transaction or item record. tablename is “transaction” or “product” key is the sequencenumber for a transaction or product code for a product path is the filesystem … Continue reading

Posted in Functions | Comments Off on ImportImage

WriteToTempFile(text)

WriteToTempFile (text) Creates a new text file in the temp directory and writes the given text to it. Return value is the path to the temp file. Availability MWScript scripts in MoneyWorks Gold v7.1.5 and later

Posted in Functions | Comments Off on WriteToTempFile(text)

External

External (command, parameters, ...) External() executes an external helper command which must be installed in <Application Support/AppData>/Cognito/MoneyWorks Gold/Externals/ (prior to v 7.1.6 it was the Standard plugins Scripts folder). The parameters are passed to the executable and the return value … Continue reading

Posted in Functions | Comments Off on External

ReplaceField

ReplaceField ("FileName.FieldName", "SearchExpression", "ReplaceExpression") Replaces the contents of the given field in all records matched by the SearchExpression with the result of ReplaceExpression. Note: When executing the external evaluate API, this function is also available as "Replace".

Posted in Functions | Comments Off on ReplaceField

Year

Year (date) Returns the year of date. Result Type Number Examples Year('7/10/6') returns 2006.

Posted in Functions | Comments Off on Year

WeekOfYear

WeekOfYear (Date) Returns ISO 8601:1988 week number for a date Result Type Number Examples WeekOfYear('15/10/13') returns 42 WeekOfYear('1/1/07') returns 52 (according to ISO 8601:1988, it is the 52nd week of 2006).

Posted in Functions | Comments Off on WeekOfYear

Val

Val(exprText) Takes a text string containing an expression. Returns the result of the expression. This provides a way of deferring the evaluation of expensive calculations, or ones with side effects, on either side of an If function. Result Type The … Continue reading

Posted in Functions | Comments Off on Val

Upper

Upper (string) Returns string converted to upper case. Result Type Text Examples Upper("Bang!") returns "BANG!".

Posted in Functions | Comments Off on Upper