ANS-1316 · CUSTOM FIELDS, RECORDS & FORMS
How to Use Formulas with Transaction Column Fields in NetSuite?
Learn effective workarounds for applying formulas and sourcing data to custom transaction column fields in NetSuite, including formatting and display options.
Short answer
When formulas like {record.field} don't work directly on transaction columns with 'Default Value' and 'Store Value' unchecked, use the 'Sourcing & Filtering subtab' to source the record and field. For complex calculations, create a sourced column and reference it in a new formula column. Remember to use spaces in formulas and ROUND() for decimal formatting.
Scenario
Users may encounter challenges when attempting to use formulas directly within custom transaction column fields, particularly when the 'Default Value' is set and 'Store Value' is unchecked. This often prevents direct referencing of record fields using the {record.field} syntax. Additionally, standard formatting options for field display may not always be readily apparent.
Solution
Formulas designed to display a field using the {record.field} syntax, when configured with 'Default Value' and 'Store Value' unchecked, typically do not function directly on transaction column fields. The recommended workaround is to utilize the Sourcing & Filtering subtab. On this subtab, select the desired record from the 'Source List' and the specific field from the 'Source From' dropdown. If more complex calculations are required, a multi-column approach can be employed:
Create a primary custom transaction column field (e.g., custcol1) that sources the necessary record and field using the method described above.
Create a secondary custom transaction column field. Configure this field with 'Store Value' unchecked and define its 'Default Value' using a formula that references the primary sourced column. For example:
{custcol1} * 100It is important to include a space between values and operators within formulas. For instance, use {custcol1} * 100 instead of {custcol1}*100.To format numeric results to a specific number of decimal places, such as two, the ROUND() function can be incorporated into the formula. For example:
ROUND({custcol1} * 100,2)While NetSuite now offers an 'Apply Formatting' setting for certain numeric custom field types, the ROUND() function remains a reliable method for precise decimal control within formulas.To hide the column used for sourcing, navigate to the 'Display' subtab of the custom field definition and select 'Hidden' from the 'Display Type' field.Alternatively, if the sourced value is consistent across all lines of a transaction, the field can be moved to the transaction body. A formula using {record.field} will function correctly in a body field. This body field can then be referenced by transaction column fields as needed.
Expert NetSuite Support
Need help with this NetSuite issue?
Custom Fields, Records & Forms consulting and configuration support
