Including Line Numbers in Transaction Searches
To make transaction line items easier to read, you can add line numbers to your transaction search results. On the Results subtab of the search definition page, add the Line Sequence Number field. This field shows the internal sequence number for each transaction line.
Line numbers may not always appear in order, even if your results include every line of a transaction. To show line numbers as a continuous sequence in your results, add a Formula(Numeric) field to your search results and use the following formula:
RANK() OVER (PARTITION by {internalid} ORDER BY {linesequencenumber})
You can create a custom formula field for line numbers and apply it to transaction forms to show line numbers on viewed and printed transactions. For instructions, see Creating a Formula Field to Display Transaction Line Numbers.
You can also include the line number in your search results to keep search results consistent with viewed and printed transaction items.
To include the line number in your search results:
-
Set a criteria of Main Line = No (false).
-
Filter out transaction line items related to taxes.
-
Add the Item field as a results field.
-
Add the Amount (Gross) field as a results field. Don't use the Amount field.
-
Add a Formula(Numeric) field as a results field with the following formula expression:
RANK() OVER (PARTITION by {internalid} ORDER BY {linesequencenumber})