How To Harness the Power of Array Items in SapphireOne

SapphireOne Array Items Overview

Arrays are fundamental data structures in software development, providing a versatile and efficient way to store, manipulate, and access multiple items of the same data type. They play a crucial role in a variety of applications and programming tasks, from managing databases and handling user input to implementing algorithms and organizing data. In this overview, we will delve into the key aspects of array items in software development, including their definition, structure, use cases, and advantages.

  1. Definition: An array is a collection of items, each of the same data type, arranged in a linear, sequential order. Items in an array are called elements, and their positions are denoted by index values, which typically start from zero.
  2. Structure: Arrays are composed of a fixed number of elements and are stored in contiguous memory locations. This allows for efficient memory allocation and quick access to elements via their indices. Depending on the programming language, arrays can be either static (fixed-size) or dynamic (size can change during runtime).
  3. Use Cases: Arrays are employed in various software development tasks, such as:
    • Storing and organizing data, such as lists, tables, and matrices.
    • Implementing data structures like stacks and queues.
    • Facilitating data manipulation through sorting, searching, and filtering.
    • Representing strings and managing text-based data.
    • Serving as input and output buffers in file and network operations.
  4. Advantages: Some key benefits of using arrays in software development include:
    • Efficiency: Arrays provide constant-time access to elements, making them highly efficient for data retrieval and manipulation.
    • Simplicity: The linear structure of arrays simplifies coding and reduces complexity.
    • Flexibility: Arrays can be easily nested, combined, or sliced to accommodate more complex data structures and operations.
    • Portability: Arrays are supported across virtually all programming languages, making them a universal tool for software developers.

In conclusion, array items are an indispensable aspect of software development, offering a streamlined and efficient means to store, manipulate, and access data. Their widespread adoption across programming languages and diverse applications underscores their versatility and importance in modern software engineering.

Array Items within SapphireOne

This article documents the most commonly requested and utilized array items that are linked to data fields in SapphireOne. These are coded by our programmers and cannot be removed or modified. If you require additional arrays for linking to other fields within the program, please contact SapphireOne.

Array Items are similar to shortcuts on either MacOS or Windows-based systems. Our programmers have created these shortcuts for commonly used data fields when generating reports.

These shortcuts depend on the SR_PreLoad variable that is used to set up the report.

For example, when “I” for Invoices is entered in aReala, it is linked to: [Invoices]Stock_Breakdown’Quantity

  • The table = [Invoices]
  • The Cell = Stock_Breakdown’Quantity

Instead of selecting the Source data entry field and then navigating to find the Stock Breakdown’Quantity cell, the user can directly enter “aReala” into the variable, and the link to the cell is established.

Most other cells in the table can be printed by going to the Source dropdown in the SapphireOne Custom Reports editor and navigating to the required cell, although this dropdown list can be quite long at times.

Texim Field Variables

These are variable fields that can be set up so that a single report may be used in more than one location.

For example, there would typically be minimal differences between an OCI and an SCI, so these Texim variables would be employed to print the same report for both, but with different text on them.

As long as the Texim number has not been previously used in the report, numbers between 120 and 200 should be relatively safe to use. Some numbers that seem to be already commonly used are from Texim110 through Texim113 for balances. A few other numbers are listed in the following tables as well.

Array Names used in the Body Area

ATEMP9A25 [Invoices]Stock Breakdown’Inventory LK 
ATemp1A25  [Inv_Locations]BaseID 
ID from an Inventory Inquiry 
ATemp7A25  [Inv_Locations]MergedID 
ID from an Inventory Locations Inquiry 
ATemp8A25 [Inv_Locations]Locations 
ID from a Location Inquiry 
ATemp5A25 [Invoices]Stock Breakdown’SerialBatchNo 
ATemp6A25 [Invoices]Stock Breakdown’SerialExpiryDate 
ATemp1A80  [Invoices]Stock Breakdown’Description, 
limited to 80 characters. With pack tally turned on, will print ‘Pack(s)‘before the batch number on each consecutive line. 
atextm  [Invoices]Stock Breakdown’Description, 
Reads the Inventory name/description as entered into an Inventory Inquiry. If it is altered in an Invoice it will read the altered name/description as entered by the user. You can ater the description in an Invoice 
With pack tally turned on, will it print ‘Pack(s)‘ before the batch number on each consecutive line.
Atextn  [Invoices]Stock Breakdown’Serial Number 
Serial number attached to the Inventory item. It will be in the format Serial No, Serial No, across the page 
aReala  [Invoices]Stock Breakdown’Quantity 
aRealb  [Invoices]Stock Breakdown’Rate 
Average cost of the item as set by the inventory rules 
aRealc  [Invoices]Stock Breakdown’Newrate 
The above Breakdown’Rate but after discounts are applied. 
ATemp2a25  [Invoices]Stock Breakdown’Discount Code 
aReald  [Invoices]Stock Breakdown’Discount Percentage 
aReale  [Invoices]Stock Breakdown’Amount 
aRealf  [Invoices]Stock Breakdown’Tax 
aRealg  [Invoices]Stock Breakdown’Total 
ATemp3A25 [Invoices]Stock Breakdown’Tax code 
The tax code assigned to the line item 
aRealh  [Invoices]Stock Breakdown’Tax Rate 
Normally the Tax Rate is locked to the Tax Code above but some tax codes are variable and may be entered here. 
aReali  [Invoices]Stock Breakdown’Backordered 
The Quantity Backordered 
aRealj  [Invoices]Stock Breakdown’Ordered 
The quantity Ordered 
aTemp4A25  [Invoices]Stock Breakdown’Project LK 
The Project Data entry field 
atexta  [Invoices]Stock Breakdown’IVBAlpha1_20 
Custom Page in a QCI OCI or SCI 
atextb  [Invoices]Stock Breakdown’IVBAplha2_20 
Custom Page in a QCI OCI or SCI 
atextc  [Invoices]Stock Breakdown’IVBAplha3_30 
Custom Page in a QCI OCI or SCI 
atextd  [Invoices]Stock Breakdown’IVBAlpha4_30 
Custom Page in a QCI OCI or SCI 
atexte  [Invoices]Stock Breakdown’IVBAlpha5_10 
Custom Page in a QCI OCI or SCI 
aRealaa  [Invoices_Stock_Breakdown]Weight 
aRealab  [Invoices_Stock_Breakdown]Pallet 
aRealac  [Invoices_Stock_Breakdown]Carton 
ArealAE  [Invoices_Stock_Breakdown]Wet_Tax 
Very last item in the long list 
ALongE  [Invoices]Stock Breakdown’LineNumbering
Starts at 1 and increments by 1 for each line in the transaction. 1 for the first line then 2 for the second line and so on. 
Atexto  [Invoices]Stock Breakdown’UDF1 
Displays data entered into UDF1 field’ 
atextf  [Invoices]Stock Breakdown’BBSupPCode 
atextg  [Invoices]Stock Breakdown’BBRef 
aRealm  [Invoices]Stock Breakdown’IVBReal1 
aDate  [Invoices]Stock Breakdown’IVBDate1 
atextz  [Invoices]Stock Breakdown’BinText 
atextt  [Invoices]Stock Breakdown’Unit 
atextu  [Invoices]Stock Breakdown’Transfer Inv Lk 
aRealq  [Invoices]Stock Breakdown’UnitQ 
aReals  [Invoices]Stock Breakdown’Org_Lamount 
aRealu  [Invoices]Stock Breakdown’Org_Ltax 
aRealv  [Invoices]Stock Breakdown’Org_Ltotal 
aRealw  [Invoices]Stock Breakdown’Org_Lrate 
aRealx  [Invoices]Stock Breakdown’Org_LnewRate 
alongd  [Invoices]Stock Breakdown’Record Order 
s_fxtax  [Invoices]Stock Breakdown’Org_Ltax (in [Invoices]FX_Format) 
s_fxTotal  [Invoices]Stock Breakdown’Org_Ltotal (in [Invoices]FX_Format) 
s_fxAmount [Invoices]Stock Breakdown’Org_Lamount (in [Invoices]FX_Format) 
s_fxrate  [Invoices]Stock Breakdown’Org_Lrate (in [Invoices]FX_Format) 
ATEMPJ  [Invoices]Stock Breakdown 
Line Rate per item, OVI 
ATEMPK  [Invoices]Stock Breakdown 
Line Amount number of items, OVI 
ATEMPL  [Invoices]Stock Breakdown 
Line Tax for the line, OVI 
ATEMPM  [Invoices]Stock Breakdown Line
Total including Tax for the line, OVI 
atextq  SSCC No in a company inquiry. The SSCC number in the shipping page of an invoice 

Other Values

Texim102  Stores the paper type
Texim140  Loads the mailing details from System Defaults for SapphireOne. Company Inquiry 
Texim141  Loads the Tax File number from system Defaults. Company Inquiry 
tdiscmess  Stores the prompt discount message. Company Inquiry > Reports Page 

Statements

Arrays Used in the Body Area 

aTexta  Transaction Type in word format 
atextn  [Transactions]Internal Ref 
atextm  [Transactions]External Ref 
aTextb  [Transactions]Internal Ref 
adate  [Transactions]Date In 
aReala  Running Total 
aRealb  [Transactions]Allocated Amt 
aRealc  [Transactions]Total 
aReald  Amount still unallocated 
aRealf  aReald if greater than 0 
aTextc  “*” (overdue) 

Other Values

tCLPerDate  Statement Date 
tlTotal  Running Total 
tBal10  Overdue Balance based upon due date. 
tbalancea  Current amount Owing 
tbalanceb  30 days Owing 
tbalancec  32-60 days owing 
Tbalanced  61+ days owing 

Cheque & Remittance

atemp  “*” fully paid 
adate  [Transactions]Date in 
ainvoice  [Transactions]Internal Ref 
aext  [Transactions]External ref 
adesc  [Transactions]Notes 
atotal  [Transactions]Total 
tatotal  Credit Memo
Value excluding Discounts, but including PPS Tax 
taamount  Discount Value 
tatax  Payment value 
areale  PPS Value 
Calcmoneywords ???  In addition to the two below there are other versions of this function. 
Calcmoneywords  Converts numerals in dollars followed by the word Dollars  Then the cent numerals in words as well followed by the word Cents.  Four Thousand Four hundred twenty dollars ten five cents. 
CalcmoneywordsNumcent As above but the numerals in cents remain as numerals.  Four Thousand Four hundred twenty dollars 15 cents. 
tStart1  Cheque number as it can be different to the internal reference number.  There is an option to enter the check numbers manually so thats why. 

Remittances cannot be test printed directly from utilities mode because the link between the VP and the invoice or VI is not established. To reprint an existing remittance, you’ll need to do so from accounts mode. To achieve this, select the payments option from the Payables dropdown menu in Accounts mode. In utilities mode, the user can only modify the presentation of the report without displaying any lines. To fully test the report, the user will need to return to the Payments function and select the new report from there to display the actual lines in the transaction.


You can review our Blog and YouTube channel for additional information and resources on SapphireOne ERP, CRM and Business Accounting software.

Was this helpful?