So, I just spent four hours trying to get a saved ...
# general
c
So, I just spent four hours trying to get a saved search working properly, and I accidentally figured it out, but I'm not sure why what I did worked so I'm looking for a clue as to how what I did fixed things. So I was trying to get a sum of the total value of item fulfillments, with each item fulfillment record having a custom field containing this monetary value. Unfortunately, the value of the custom field was being multiplied by the number of lot numbers in the item inventory detail. So I set about dividing by setting a Formula (Currency) Sum using
{custbody_cntm_fulfill_amount}/COUNT({inventorydetail.inventorynumber})
, but this threw the dreaded Unexpected Error. To make sure I didn't fat-finger the custom field name, I commented out the division, like so:
{custbody_cntm_fulfill_amount}/*/COUNT({inventorydetail.inventorynumber})*/
, and voilà, it worked. Why did commenting the division out cause the correct behavior? Thanks!
m
I don't know. did it work if you wrapped the whole COUNT in () like {field}/(COUNT({anotherfield}))
c
Nope, same unexpected error. Very strange.
g
And the math works out with the comment?
c
Sure does! Very bizarre!
g
Indeed. I had division problems in a saved search and ended up finding a solution that had me use "maximum" summary type.
j
c
That was one of my open tabs for sure. Worked with Marty and his team at a previous job; they're good.
👍🏻 1