Calculation Based on Several Dynamic Fields

Hi guys. I am trying to run an input calculation based on other dynamic inputs without much luck. Nothing show up as results, but I have values for each individual input. I have all the inputs set to currency, so I don’t believe that is the issue. I have tried for the last several hours with no luck. Any help or direction would be much appreciated. Thanks.

Have you tried looking at your app in debug mode (add?debug_mode=true to the end of the url) because it’ll give you options to look at the conditions for elements to see how Bubble is interpreting each calculation.

Best of luck!

1 Like

Thank. I just tried this. Doesn’t seem to be the issue. I appreciate your help.

Using to debug mode won’t solve the problem automatically, but it will give you the ability to debug your own “code” to see how bubble’s interpreting it. This is how I figure out what’s wrong with my code whenever it’s not obvious to me at first glance.

For example, you could dig in and investigate why your end result is blank. It’ll help you trace the logic from the output down through each of the inputs and see what step within your logic doesn’t seem to be working as you had expected.

2 Likes

Thank you. The results of calculations themselves are not blank. Seems that somehow the values are not being recognized. Not sure how to explain it. Even when I attempt to save the results (Subtotal, Discount, etc) in the database it saves them as blanks. But I can see that the calculations work. For example in the attached photo The results are there. (I have the same calculation for initial inputs as well.) When I save them in the database they save as blank and when I use them to calculate the total they are also recognized as zero or blank. The total is a calculation = Input Subtotal-Input Discount+ Input Tax. It’s the first time I have come across this issue so it seems strange.

So apparently it was because I had the initial input calculation formatted as currency. I have removed the formatting and it seems to have resolved this. Thanks again.

1 Like

is this within a RG ?

No, it isn’t. The issues seems to have been that I had the initial input calculation formatted to currency (*formatted as $" at the end of the calculation). I guess that prevents it from being recognized as a number for calculation purposes and for saving to the database. Please excuse my lack of technical terms

I have removed the formatting and it seems to now recognize the values. Thanks :slight_smile:

nice, I’m trying sum from within RG, still no luck

I’m not clear on what you are trying to sum. Are you trying to sum the items in the repeating group? For example totals, price of the items.

How do i add things together in RG. I think would be easier to understand if you saw.

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