Nada Ahmed
10/21/2024, 9:48 AMCeligo AI
10/21/2024, 9:49 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you are trying to create a formula to show the item fulfillment quantity in a specific scenario. You can use a
CASE WHEN
formula in a saved search to achieve this. Here's an example of how you can do it:
sql
CASE WHEN ({transferorderquantityshipped}-{transferorderquantityreceived}) >= 0 THEN ({transferorderquantityshipped}-{transferorderquantityreceived}) ELSE {quantity} END
In this formula, we are checking if the difference between the shipped and received quantity of the transfer order is greater than or equal to zero. If it is, we return this difference as the result. Otherwise, we return the original quantity.
Please note that you might need to replace {transferorderquantityshipped}
, {transferorderquantityreceived}
, and {quantity}
with the actual field IDs in your NetSuite account.
Also, if any of these fields can potentially be null, you should wrap them in the nvl({field},0)
function to replace any null values with zero. This will prevent any errors when performing the subtraction or comparison operations.
Here's how the formula would look with the nvl
function:
sql
CASE WHEN (nvl({transferorderquantityshipped},0)-nvl({transferorderquantityreceived},0)) >= 0 THEN (nvl({transferorderquantityshipped},0)-nvl({transferorderquantityreceived},0)) ELSE nvl({quantity},0) END
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/21/2024, 9:49 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8400774
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838560522
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831848145
Celigo AI
10/21/2024, 9:49 AM