how could this be done: ```MAX(CASE WHEN {applying...
# ask-stanley-ai
n
how could this be done:
Copy code
MAX(CASE WHEN {applyingtransaction.type} = 'Vendor Bill' THEN {applyingtransaction} ELSE 0 END)
Then, you can apply the
REPLACE
function to the result of this formula in a separate step.
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the error might be caused by the use of the
MAX
function within the
CASE
statement. The
MAX
function is an aggregation function that can only be used outside of a
CASE
statement in a summary type formula. You can try the following formula:
Copy code
MAX(CASE WHEN {applyingtransaction.type} = 'Vendor Bill' THEN {applyingtransaction} ELSE 0 END)
This formula will return the maximum value of
{applyingtransaction}
when
{applyingtransaction.type}
is equal to 'Vendor Bill'. If
{applyingtransaction.type}
is not 'Vendor Bill', it will return 0. The
MAX
function will then return the maximum value from these results. After you have the result from the above formula, you can apply the
REPLACE
function to it in a separate step. The
REPLACE
function in NetSuite is used to replace part of a text string with another text string. ****** 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.847471595
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84711051
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830783784
Please provide your feedback on this answer.