NetSuite Saved Search Formulas
NetSuite saved formulas are a powerful tool that can be used to calculate new values based on existing data. They can be used in saved searches, custom fields, and scripts.
There are several types of Saved Formulas that can be used in NetSuite, including:
Formula (Numeric) – This formula type is used to perform numeric calculations and return a numeric value. It can be used to calculate the total cost of an inventory item, the commission for a sales representative, or the tax on a transaction.
Formula (Date) – This formula type is used to perform date calculations and return a date value. It can be used to calculate the due date for an invoice or the expiration date for a contract.
Formula (Text) – This formula type is used to perform text manipulations and return a text value. It can be used to concatenate text strings or extract a substring from a larger text string.
Formula (Boolean) – This formula type is used to perform logical operations and return a Boolean value. It can be used to check if a certain condition is true or false.
Formula (Currency) – This formula type is used to perform currency calculations and return a currency value. It can be used to calculate the exchange rate between two currencies or the total value of a transaction in a specific currency.
Different Formulas to Use
There are many different formulas that you can use in NetSuite. Here are a few examples:
CASE:
The CASE statement can also be used to evaluate multiple conditions. For example, the following CASE statement would return the value of the Quantity field if the Status field is equal to “Open” and the Date field is today’s date, and the value of 0 if either of those conditions is not met:
Code snippet
CASE WHEN Status = “Open” AND Date = TODAY() THEN Quantity
ELSE 0
END
Basic CASE Statement: “If This Or Then That”
Case when [Formula expression that results in boolean] then
[True Value]
else
[False Value]
end
CASE with Nested Conditions: “If This Or Then That Or Then That … “
Case when [Formula expression that results to boolean] then
[True Value]
when [2nd Formula expression that results to boolean] then
[2nd True Value]
when [3rd Formula expression that results to boolean] then
[3rd True Value]
else
[False Value]
end
I hope this article has been helpful. If you have any questions, please feel free to ask.
0 Comments