top of page

Sum that Results in a Blank instead of a Zero in Knack

Updated: Oct 18, 2023



I run in to this more than I would like with my Knack database apps: A sum function results in a blank instead of a zero. I do a lot of accounting apps, and it just doesn't look right. In this video I take you through what is going on here, and how to resolve it. Check it out.



Interested in my Knack database app services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdave











Full Transcript

Okay folks de perch share Knackbuilders. I'm going to get right into this one. This one might almost be too long, but it's something that I find annoying some functions that result in a blank instead of a zero. I'll show you what I mean. Let me go to an app.

Right here now look at all this. This is a budget and what this is doing. This is summing up child records and cascades down quite a bit. But it's an accounting app and I'm a developer of an accounting background. I'm sort of a detailed person. I don't like these zeroes here, i mean the blanks, this should be zero. It doesn't do it with the count function, but with some function. I run across this a lot. I'm going to show you what the deal is with this and how to resolve it. Thanks OKY. I'm back here with the topic of sums that result in blanks instead of zeros as they should be zeros. Here's what's going on here. This is a budgeting app. There's several levels to it, different grants and they're broken up and they get down to a point where expense items is an invoices NA have too. We create an involvements and and we have line items or expense items and they go against these.

So these are expenses that have been submitted but not approved. These have been improved and I won't get into all this and they get a balance. What's happening is when it results in a blank that this, this activity or this part of the budget doesn't have any expenses yet. So it's looking down. It doesn't find anything to even count and results in a blank. What these are are actual expenses. They exist as an expense line item. Going against this, it's able to count it and it results at a number and that's what's going on here now. Here's how to resolve it.

Here's What I did.

For these expense I have two things here. This is the sum that if it doesn't have any expense line and items to count it result in a blank. What I did. This is the power of conditional ro is I talk about all the time i put a currency a matching currency field and I put a condition on it that makes its value that one that results in a blank and the currency field must know if it results in a zero and I did that for each one of these you only have to do that for the lowest level and then it results in that currency field being a zero, an actual zero and then the sum functions of the parent grandparent records will recognize that as zero. And then here's how it it looks, how it should look again. An accounting program with blanks isn't good, it works, but it just doesn't right. So now we have this balanced out with the zero s. That's what I got for today. How to. If you run across that, that's what's going on and this is how to fix it. And by the way I use the currency figure, if you weren't counting dollars or some type of currency you can use a number field and it would behave the same way. Thank you.




<video>




9 views0 comments

Comments


bottom of page