MYOB Exo Clarity

Hide NavigationShow Navigation

  • Contents
  • Index
  • Search
 
Display results with all search words

 

Exo Business Functions

AgeToDateRange

Returns the start and end dates of the specified period age. The age is specified as it appears in Exo Business, e.g. 0 is the current period, 1 is the previous period, 2 is two periods ago, etc. The ledger is specified by a single letter, which must be one of:

  • D = Debtor
  • C = Creditor
  • G = General Ledger
  • S = Stock

Declaration: procedure AgeToDateRange(Age: Integer; Ledger: string; var StartDate, EndDate: TDateTime);

AskforValue

Opens a small window prompting a user to enter a value, then returns the value that the user entered. You can specify the heading that should appear in the window's title bar, the prompt that appears on the window, a default value (which is returned if the user clicks Cancel), and whether or not the user must enter an integer value. For example, the following code:

ShowMessage('The value is ' + AskforValue('Example of AskForValue', 'Please enter a value', 'default', false));

will result in this window appearing to the user:

The value that the user enters is then displayed using the standard ShowMessage function.

Declaration: function AskforValue(DialogHeading: String; DialogPrompt: String; DefaultValue: String; RequireAnIntegerValue: Boolean): String;

Note: The function always returns a string, even if the user was required to enter an integer.

ComputerIDFields

Returns ID information for the computer with the specified SEQNO. The output string of the function is CLIENTNAME\COMPUTERNAME.

Declaration: function ComputerIDFields(aComputerSeqno: Integer; var ComputerName: String; var ComputerID: String; var ClientName: String; var EFTCAID: String): String;

Execute SQL

Executes any SQL Server command from within Clarity, e.g.

ExecuteSQL('update stock_items set status = "L" where stockcode = ' + '"LABOUR"');

This function only available in the Report Designer if the User-level profile setting Allow Clarity ExecSQL Function is set to "Design and Runtime".

Declaration: procedure ExecuteSQL(ASQL: String);

FileExists

Returns true if the specified file exists. This can be used to determine if a company logo image exists and if so display it, as in the following code:

if FileExists(GlobalProfileReadString('IMAGESDIR') + '\' + GlobalProfileReadString('FORM_LOGO')) then
 begin
   FormLogo.Picture.LoadFromFile(GlobalProfileReadString('IMAGESDIR') + '\' + GlobalProfileReadString('FORM_LOGO'));
 end;

Declaration: function FileExists(pathname: String): Boolean;

FormatExoProtocolLink

Returns an Exo protocol link for a specified Command and Value, e.g.

Link := FormatExoProtocolLink('draccount', 10);

This will return exo://<current alias>/draccount(10) into the link.

Declaration: function FormatExoProtocolLink(Command, Value: String): String;

Note: This function uses the Exo protocol handler to enforce security constraints, i.e. as with all Exo protocol links, users cannot use them to access part of the Exo Business system that they do not have access rights for.

GetChartSeries

Returns the series object of a chart that corresponds with the supplied series index number. This is used in some dashboard reports to open Exo Business records when a chart is clicked on, using Exo Business procedures like ShowDebtor, ShowCreditor or ShowStockItem (see below) to open the record.

See the DashTopNCustomersbyYTDMargin.CLR or DashTopNStockbyYTDSalesValue.CLR reports for examples.

Declaration: function GetChartSeries(TeeChart: TppTeeChart; const SeriesIndex: Integer): TComponent;

GetCheckDigit

Returns a check digit (used with bank accounts) for the specified invoice.

Declaration: function GetCheckDigit(InvoiceRef: String): String;

GetTaxValue

Returns the tax value for a line, using the following inputs:

  • ATotal - the line total amount
  • Ledger - the ledger, which should be 'Dr' or 'Cr'
  • StockCode – the stock code of the stock item on the line
  • ATaxStatus – the ID of the tax rate to use, or enter -1 to let Exo Business determine the tax code to use

Declaration: function GetTaxValue(ATotal: Double; ALedger, AStockCode: String, ATaxStatus: Integer): Double;

GolbalProfileReadBoolean

Returns the value of the specified profile setting as a boolean value. Profile settings are identified by their profile name, not their descriptive name, e.g. 'ALLOWAGEDBALEDITING', not 'Allow editing of debtor/creditor aged balances'.

Declaration: function GlobalProfileReadBoolean(aProfileField: String): Boolean;

GlobalProfileReadString

Returns the value of the specified profile setting as a string. Profile settings are identified by their profile name, not their descriptive name, e.g. 'FORM_LOGO', not 'Company logo filename'.

Declaration: function GlobalProfileReadString(aProfileField: String): String;

IsZeroValue

Returns true if the supplied value is zero.

Declaration: function IsZeroValue(ANumber: Double): Boolean;

LoadStockVal

Loads a pipeline used by stock valuation reports.

Declaration: procedure LoadStockVal(const aLocation: Integer);

LoadVariance

Loads a pipeline used by stock variance reports.

Declaration: procedure LoadVariance(const aLocation: Integer);

LoggedInStaffNo

Returns the STAFFNO of the Exo Business staff member who is currently logged in.

Declaration: function LoggedInStaffNo: Integer;

MarketingClassName

Returns the descriptive name of the marketing class associated with the supplied CLASSNO in the format "ID. Name", e.g. "1. Accounts".

Declaration: function MarketingClassName(aClassNo: Integer): String;

RefreshPage

Refreshes the data sources by re-querying the Exo Business database, redraws the resized page and refreshes any components that have not updated themselves.

Declaration: procedure RefreshPage(aReport: TppReport);

Note: This function should not be used carelessly - it does a complete refresh of the entire report including all data source querying, as if you had closed the report and reopened it. If it is called too many times, your report will slow down significantly. Refreshing does not happen immediately, so it is not advisable to call this function to get the record count to calculate - use the LookAhead option instead.

SellPriceName

Returns the descriptive name of the sell price associated with the supplied PRICENO in the format "ID. Name", e.g. "1. Internet".

Declaration: function SellPriceName(aSellPriceNo: Integer): String;

SetChequeNo

This procedure is used to increment the cheque number when print cheque remittance reports. You can see it in use in FinPPCheqWr.CLF.

Declaration: procedure SetChequeNo(iChequeNo, iSeqNo: Integer);

ShellExecute

Executes an external DOS command.

Declaration: function ShellExecute(AFileName: String; AParams: String; AFolder: String; AWaitFor: Boolean): Integer;

ShowCreditor

Opens the Creditor Account Details window, showing the account with the specified ACCNO.

Declaration: procedure ShowCreditor(AccNo: Integer);

ShowDebtor

Opens the Debtor Account Details window, showing the account with the specified ACCNO.

Declaration: procedure ShowDebtor(AccNo: Integer);

ShowGLCode

Opens the General Ledger Account Details window, showing the specified GL account. The GLCode can be a single account number, e.g. 1000, or a formatted string, e.g. 1000-10 or 2-1000-10 with the branch.

Declaration: procedure ShowGLCode(GLCode: String, HasBranch: Boolean);

ShowJob

Opens the Job Details window, showing the account with the specified JOBNO.

Declaration: procedure ShowJob(JobNo: Integer);

ShowNonAccount

Opens the Non Account Details window, showing the account with the specified SEQNO.

Declaration: procedure ShowNonAccount(SeqNo: Integer);

ShowServiceUnit

Opens the Exo Serviceable Units window, showing the account with the specified SEQNO.

Declaration: procedure ShowServiceUnit(SUSeqNo: Integer);

ShowStockItem

Opens the Stock Item Details window, showing the stock item with the specified STOCKCODE.

Declaration: procedure ShowStockItem(StockItem: String);

TaxRateName

Returns the name of the tax rate with the supplied SEQNO. If ReturnLongName is true, the tax rate's NAME is returned; if it's false, the tax rate's SHORTNAME is returned.

Declaration: function TaxRateName(aTaxRateNo: Integer; ReturnLongName: Boolean): String;

TaxRateRate

Returns the rate of the tax rate with the supplied SEQNO.

Declaration: function TaxRateName(aTaxRateNo: Integer): Double;