I have a BAQ that is iterating over the partDtl table to calculate supply and demand for a given part. See formula below as an example. My expectation is I should have 0 or some integer greater than 0 for this field given this formula, but what I’m finding is the field is blank for parts with no demand. I believe what’s happening is my calculated field(formula) is never executed to initialize as 0 as their are no rows to iterate over. What’s the best way to handle this type of a scenario?
1 Like
I’m not an expert in calculated fields and I’m not even sure if this will help you or how you would implement this with your current formula but I have used the “ISNULL” function a lot when getting blank/null values returned. One example for a BAQ I have is the following:
(JobProd.WIPQty - ISNULL(RcvDtl.OurQty,0))
If a quantity from a receipt doesn’t exist then instead of a blank null field it will return a 0
Not sure this helps you but thought I’d throw it out there.
1 Like
Hi Eddie,
Yes, isnull() should work:
isnull(sum(case…end), 0) where 0 will be the value returned if the result is null.
Dragos
2 Likes