a way to identify the items that have discount lin...
# ask-stanley-ai
n
a way to identify the items that have discount line after it in a saved search using a formula
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems that you can identify the items that have a discount line after it in a saved search using a formula. You can use a CASE statement in your formula to check the description of the discount item. If the description contains "Shipping", you can return the {amount}, otherwise, return the {netamount}. Here is an example of how you can do this:
Copy code
CASE WHEN {memo} %like% 'Shipping' then {amount} else {netamount} end
However, if you are not returning the discount item and only returning the assembly item, you might not be able to use the above CASE statement. In this case, you can try to use {transaction.discountamount} to get the discounted amount. If this gives you the discounted amount, you can back into it and exclude anything where {transaction.discountamount} > 0. Here is an example of how you can do this:
Copy code
CASE WHEN {transaction.custbody_customer_type.id} = 18 AND {transaction.name.id} = 83725 THEN {transaction.netamount}*1.31 ELSE {transaction.netamount} END
Please note that these are just examples and you might need to adjust them according to your specific needs. ****** 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.834594786
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.83313
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831054807
Please provide your feedback on this answer.