robert
2
I use a lot of formulas in my app, and have used different approaches with differing results.
Your example in #1 would actually work in Bubble without order of operations.
For those that won’t, I usually break up the formula and have a hidden input that holds the first part of the calculation needed for the full calculation.
In general, I would advise not to use workflows to perform calculations in the backend, as there can be delays in updating the value, which creates a poor user experience, and in some cases, the workflow can fail, and the number is not calculated correctly. I have tried this approach, and was generally frustrated with the complexity, performance and reliability.
If you need a value saved to the database, it is best to use a save button if you can. With this type of workflow you can have it save the calculated value in the input field, and then pause a second, and double check that the value is saved correctly in the database, and if not save it again. Sort of a belt and suspenders approach.