i’m just trying to adapt the `DECODE({item}, 'Item...
# general
m
i’m just trying to adapt the
DECODE({item}, 'Item XXX', {quantity}, 0)
code that i use on a saved transaction search to this new saved item search but not having the luck i was hoping for
b
you might be able to do it without doing decode
m
any ideas how? 🙂
b
group by the
Name
(or
Internal Id
) column and sum by
Transaction : Quantity
m
definitely super close to what i’m after. i also want to list items that have not been purchased with a “0” in the transaction quantity column fingers crossed
b
use NVL
m
something like
NVL({transaction.quantity}, {name})
?
b
that extremely weird and wont sum
NVL returns the first expression if it isn't null, otherwise it returns the second one
in your NVL, if there is no transaction quantity, it returns the name of your item
m
ok am trying
NVL({transaction.quantity}, '0')
and getting the same result as previous which is just listing the items the customer has been invoiced for rather than all items
b
what are your filter criteria
m
simply ‘transaction : type = invoice’ and then i’ve got a filter to select the customer’s name
b
your filter on the customer will limit your results to items that have transactions belonging to that customer
m
hmm damn, was hoping to list items even if the quantity = 0
b
its not that the quantity is 0
m
ultimately this was to be configured as sublist on the sales order form so users can easily see which quantity = 0
b
its that there isn't a join row that matches your filter
you can try saying that the customer is x or none
but im not sure how you can get that as a sublist
m
yeah i figure if i can’t set the filter to the customer name while testing a saved search it just can’t work as a sublist either which relies on the filter
k
Why not just do saved search fields?
4 searches. 4 fields. Available filter name, field join name (on field setup)
Of course this breaks down if you have more than 4 items
m
interesting, not a bad idea shall try. thanks!