Bug in nested "is empty:" HELP!

So I’m about to pull my hair out. Does bubble have a bug with the “is empty:” operator when it’s nested in an expression that does basic sums?

So here’s what I got, I’m trying to change 5 number fields of the “Invoice” object (see screenshot). Basically if the field is empty I want the new incoming value to be pasted there and if the field already has a value there, then I want that incoming value to be added.

Initially these 5 fields are always empty so the logic should always just paste the value “adyen_settlms interchange (NC)”, but that DOESN’T happen! It always goes to the other condition (where it sums +1).

Initially the “INV Fee Merchant Interchange” value IS ACTUALLY empty so if you sum that is bubble doing null + 1? The resulting number in the database is always some random number every time I try this. The resulting operation for “is empty: → no”, is actually different, I just narrowed it down and tried doing something simple like a +1 to find the problem and that’s how I got to here. Am I missing something, is this a bubble bug or am I crazy? I’ve been at this for 5 hours.
Is there an easier way to do basic conditional arithmetic’s in bubble?

Thanks a ton!
Pedro - Dev

Did you test in debug mode step by step by investigating if the is empty really return yes?
Is it really empty? 0 is not empty… Did you set a default value in DB settings?

1 Like

This is in a backend workflow, and there is no default value when created :confused:

Privacy rules?

:thinking: pretty sure all created records will default to whatever value you set (or don’t) in your datatype, regardless if it’s created client side or server side.

I clicked the box to ignore all privacy rules, I re-did this in the front end just to see what the debugger shows. On the front end it works, on the backend it outputs gibberish…

This topic was automatically closed after 14 days. New replies are no longer allowed.