Return Authorizations have a subtotal field. How c...
# ask-stanley-ai
a
Return Authorizations have a subtotal field. How can I retrieve that same number via search, when "subtotal" is not a valid search result column for Return Authorizations?
c
AI generated answer (using internal Slack threads):
To retrieve the subtotal from a saved search of sales invoices or return authorizations, you can use a formula that subtracts the tax and shipping amounts from the total amount. The subtotal is not a valid search result column for Return Authorizations, but you can calculate it using other available fields. Here is the formula you can use:
{amount} - NVL({shippingamount},0) - NVL({taxtotal},0)
This formula subtracts the shipping amount and tax total from the total amount. The
NVL
function is used to replace any null values with 0 to avoid errors in the calculation. Please note that this formula might not work correctly if there are withholdings or if the search covers US nexuses, as the necessary fields might not exist on those forms. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836731076
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835510314
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827026367
Please provide your feedback on this answer.
Thank you for your feedback