When / where does Bubble support multiplication within workflows?

I run into this issue somewhat regularly so figured I’d ask the community to see if I’m missing something.

I regularly want to multiply a value (input number or hidden value) by another number (usually hard coded within Bubble) and can’t find an easy way to do this. As such, I’ve been creating extra hidden values for each new value I want to calculate and then referencing that number from the workflow. Not a big deal when need to do it once, but sometimes I need to set-up 20+ actions and creating that many hidden values for this seems crazy. Plus, I don’t want to expose the data to technical users on the UI and give them an opportunity to mess with it.

Wondering if there’s a better way to do basic multiplication like this? (I feel like I must be missing something)

What’s an example of where you expect to be able to multiply, but can’t? Usually if you have compatible number types, all the basic operations should be there. Or maybe I’m not understanding the question…

I’ve run into it numerous time and don’t understand why Bubble doesn’t give me the multiplication option. I didn’t think it was because of compatible number types, but perhaps that is it and I’m just misunderstanding something.

Here’s a specific example.

In an action, I have a time and I’m adding seconds to that time. In the 3 section of me adding time, I want to add 3005 seconds (i.e., 1500 seconds). I plan to substitue the “300” for a value from my database that’s dynamic. But, I can’t get 3005 to work in this spot (less yet a dynamic value * 5).

Ah, well yes, in this case with dates, you’ll have to do the math before this point. Custom states are useful for this so that you don’t have a bunch of hidden inputs everywhere.

I may be wrong on the reasoning for this, but since Bubble doesn’t have order of operations, the expression would need more info to multiply a date/time value because it just calculates from left to right. Jan 1 2016 10 a.m. + 300 seconds = Jan 1 2016 10:05 a.m… but then that date/time x 5… times 5 what? 5 seconds? Hours? Days? Maybe this is an addition worth requesting for date math, but it would have to be multiple “x(interval)” like we currently have with “+(interval)”

Makes sense. It helps me to understand that logical reasoning behind this as you’ve explained. Thanks.

1 Like