FRACCT Function

Sage 300 ERP

FRACCT Function

This function retrieves data from G/L account records, including account optional fields. It cannot retrieve data from transaction optional fields.

Syntax

FRACCT(field name, account reference, criteria, formatted)

Note: The function returns a blank if the account reference is missing, the account does not exist, or if no accounts exist in the specified range.

Arguments

Argument Description
field name

The name of a field from the G/L account record, including account optional fields.

Tip: Account optional fields have an "A." prefix.

account reference

A string specifying a single account or a range of accounts. SeeAbout Account Number References.

Note:
  • For a range of accounts, the function returnsonlythe data that is common to all accounts.
  • If the account does not exist, FRACCT returns a hyphen (-).
criteria An expression that imposes selection criteria on the accounts. The account reference and expression together determine the accounts that will be included in the calculation. See About Selection Criteria for Filtering Accounts.
formatted (Optional)

Indicates whether the return value should be formatted according to the presentation defined in the view. If omitted, the default is "Formatted." Use one of the following constructs:

  • "FORMATTED", "F", or "FMT"
  • "UNFORMATTED", "U", or "UNFMT"

You can use the following G/L account field names. To retrieve optional fields, add the prefix "A." before the field name (include the period).

Field Name

Description

ACCTID Account number, including all segments
CREATEDATE Date the account was created
ACCTDESC

Account description

ACCTTYPE

Account type

  • If unformatted, I, B, or R
  • If formatted, "Income," "Balance sheet," or "Retained earnings"
ACCTBAL

Normal balance

  • If unformatted, 1 for debit or 2 for normal credit
  • If formatted, "Debit" or "Credit"
ACTIVESW

Account status (Active or Inactive)

  • If unformatted, 1 for active or 0 for inactive
  • If formatted, "Active" or "Inactive"
CONSLDSW

Consolidation setting

  • If unformatted, 1 if transactions are consolidated on posting, 0 if they are not
  • If formatted, "Consolidate journals" or "Do not consolidate journals"
QTYSW

Quantity setting

  • If unformatted, 1 if quantities are used with account, 0 if not
  • If formatted, "Yes" or "No"
UOM The unit of measure, if quantities are used
ALLOCSW

Allocation setting

  • If unformatted, 1 if account can be reallocated, 0 if not
  • If formatted, "Yes" or "No"
ACCTOFSET Account number for reallocation
ACCTSRTY Allocation transaction source code
ROLLUPSW

Rollup setting

  • If unformatted, 1 if account is a rollup account, 0 if not
  • If formatted, "Yes" or "No"
MCSW

Multicurrency setting

  • If unformatted, 1 if multicurrency, 0 if not
  • If formatted, "Yes"or "No"
SPECSW

Specific source currencies setting

  • If unformatted, 0 if all currencies, 1 if specified
  • If formatted, "All currency" or "Specific currency"
ACCTGRPCOD Account group code
CTRLACCTSW

Control account setting

  • If unformatted, 1 if account is a control account, 0 if not
  • If formatted, "Control account" or "Non control account"
SRCELDGID (Reserved field) Source ledger, if the account is a control account (for example, AR or AP).
ALLOCTOT Percentage total of different allocation rates
ABRKID Account structure code
YRACCTCLOS Last year closed
ACCTFMTTD Formatted account number
ACSEGVALn (n= 01 to 10) Account segment code, 01 to 10
ACCTSEGVAL Segment defined as the Account Segment in G/L Options
ACCTGRPSCD Account group sort code
POSTOSEGID The code for the segment used for account posting
DEFCURNCOD Default currency code

Examples

Statement Return Value
=FRACCT("ACCTDESC","1000-333") "Cost of goods sold"
=FRACCT("QTYSW","1000-333","F') "Yes"
=FRACCT("ACCTTYPE",
"1000-333","FMT")
"Income"
=FRACCT("A.ACCTCLASS","4000") "Sales"
=FRACCT("ACCTDESC","1000-333:1000-400")

Prints a description that includes only those words that are common to each account in the account range.

For example, if the accounts in the range have the following descriptions, the word "Receivable" would be the return value.

  • Accounts Receivable: customers
  • Accounts Receivable: employees
  • Receivable: over 90 days

Related Topics