Todd Juenemann
05/15/2023, 5:31 PMGregory
05/15/2023, 6:01 PMsql
CASE WHEN {warehouse3quantity} > 0 THEN 0 ELSE {warehouse1quantity} END
In this formula, we are checking if the quantity in Warehouse 3 ({warehouse3quantity}
) is greater than zero. If it is, we set the quantity in Warehouse 1 to 0. Otherwise, we keep the original quantity in Warehouse 1.
Make sure to adjust the field names {warehouse3quantity}
and {warehouse1quantity}
according to the actual field names in your saved search.
By using the CASE statement with the logical condition, you can conditionally update the quantity value based on the inventory in Warehouse 3.
Repeat the same process for Warehouse 3 column formula if needed.
Save your changes to the saved search and test it to see if the quantities are being zeroed out correctly based on the inventory in the specified warehouses.
Please note that the field names and formula syntax may vary depending on your specific NetSuite setup and field naming conventions. Adjust the formula accordingly based on the actual field names in your saved search.Tim Chapman
05/15/2023, 6:02 PMGregory
05/15/2023, 6:02 PMGregory
05/15/2023, 6:02 PMTim Chapman
05/15/2023, 6:06 PMTim Chapman
05/15/2023, 6:06 PMTodd Juenemann
05/15/2023, 6:18 PMTodd Juenemann
05/15/2023, 6:18 PMTim Chapman
05/15/2023, 6:21 PMTodd Juenemann
05/15/2023, 6:24 PMTim Chapman
05/15/2023, 6:27 PMTodd Juenemann
05/15/2023, 6:31 PMTim Chapman
05/15/2023, 6:33 PMStephanie Hughes
05/15/2023, 6:37 PMTodd Juenemann
05/15/2023, 7:50 PMStephanie Hughes
05/15/2023, 7:52 PMcase when {inventorylocation} = 'W1' and {locationquantityavailable} > 0 then 0 else case when {inventorylocation} = 'W2' then {locationquantityavailable} end end
Todd Juenemann
05/15/2023, 8:11 PMTodd Juenemann
05/15/2023, 8:12 PMTodd Juenemann
05/15/2023, 8:21 PMDavid B
05/15/2023, 9:52 PMDavid B
05/15/2023, 9:54 PMDavid B
05/15/2023, 10:38 PMCASE {inventorylocation}
WHEN 'W1' THEN {locationquantityavailable}
WHEN 'W3' THEN DECODE(SIGN({locationquantityavaiable}),1,0)
END
Can also be written entirely with DECODEs:
DECODE({inventorylocation},
'W1', {locationquantityavailable},
'W3', DECODE(SIGN({locationquantityavailable}),1,0)
)
Or more verbosely as:
CASE
WHEN {inventorylocation} = 'W1' THEN {locationquantityavailable}
WHEN {inventorylocation} = 'W3' THEN
CASE WHEN {locationquantityavailable} > 0 THEN 0 /* else null */ END
END
David B
05/15/2023, 10:44 PMTodd Juenemann
05/16/2023, 1:38 PMTodd Juenemann
05/16/2023, 1:53 PMDavid B
05/17/2023, 1:29 AM