Basically, I want something to do math operations inside an actual block. This would be especially useful for stuff like incrementing a number in a database. Just add a lookup/etc block, and then an update row with this math insert. It would use standard math stuff, only addition, substraction, multiplication, and division. It would let you insert actual variables and stuff, this is just an example screenshot. The equals icon on the right is the button that would add one of these blocks. It could be elsewhere, but that was the best spot I could come up with.
Bumping this very old suggestion
what about an math block in which you can type any math problem in and it will solve it, for example the input would be “5-9*4” and it would have an result variable
That’s basically what I’m thinking, but it could go inside another block instead of needing to be separate.
This is a cool idea and a clever way to embed operations into blocks.
Math parsing is a bit tricky, I’ve looked into it before and there aren’t a ton of great options but I can look again. Regardless I think building a “framework” for this would be valuable.
I almost wonder if a “JSON Parse” variant of inserting variables could be another application of this, where you could insert a variable, then specify a JSON path “within it” and the output of the block is its parsed value.
I’m not sure how exactly this would work within CM or on the backend but I like the idea.