My Deal table has a rollup field that shows the count of the IDs of related Position records.
But when there are no related Position records for a certain Deal, the rollup field sometimes shows 0 and sometimes remains blank.
I need to be able to filter based on the Position count, but when the value is blank the filter always evaluates to false.
For example, a Deal should pass the filter if its Positions count is less than 7, but since it’s blank (instead of 0) I believe the Deal is getting filtered out.
Did the team get a chance to look at this yet?
Hi, please take a look at this when you can. Thank you.
Anyone know of a workaround? I’ll share my use case:
My users submit their Deals to Funders via email. But each funder has its own required criteria. One such criteria is the Deal’s number of “positions” or existing loans.
So if a Deal has 0 positions, then all Funders whose minimum number of positions is 0 should be appearing in the “Matched Funders” table.
But it seems that a Deal with 0 positions will often have a blank value in its “num pos” field, which is the rollup count of that Deal’s related position records.
Since this blank value is not >= 0, the filter evaluates to false even though it should be true.
I know this is the case because only after you add a related position to that Deal and then remove it, the matched Funders show up.
Is this how the count rollup is supposed to work? To not return 0 by default when there are 0 related records?
Good question @fundmore … we’ll have to think about how we handle this one a bit carefully.
The same issue would apply to any number field where you haven’t yet set a number.
In the meantime you could do “>= 0 OR IS EMPTY”
That’s a good idea, but it only lets me filter based on the Funder fields.
The “Select a field” dropdown does not have the same kind of data picker that the “Some value” has.
So I can’t filter for Deal’s “num pos” field is empty.
I see what you’re saying, so it’s a nested value?
Could you add a lookup or rollup on that value to lift it it up to Deal table?
No, because there is no relation between the Deal and that Funder row.
“Matched funders” are just the Funders that pass a series of filter tests, given that Deal’s criteria.
The issue is when the Deal’s rollup field is blank instead of 0, that one filter breaks the whole system.
Is there a way to auto-refresh this rollup field daily through the GraphQL layer?
We’re going to chat about this internally and see what we can do
It’s not so much that the value isn’t synced, it’s just that, at the moment, the lack of a connection leads it to not ever calculate, and thus stay null
instead of 0
Ok, great to hear. Please keep me updated here if there’s a solution.
Hi, was there anything the team can do?
If not, I think I will build a workaround that auto-creates and deletes a Position record every time a Deal is created.
Not at the moment @fundmore - it’s something we hope to tackle soon, but it’s a bit of an edge case at the moment.
That workaround seems reasonable though
Alright. I did it quite easily through Workflows.