Add limits to numeric variables value

Hi!

I would like it to be possible to set limits to numerical value variables, such as a max and min number (like when I use it to make shopping carts I would easily like to be able to just set it up in a way that the value for variable “in_cart” cannot go below 0.

Additionally it would be nice if you could define the limits to round off on variables, such as round to max 2 decimals or even to be able to set an integer variable, meaning that it needs to round the variable calculation always up to an integer.

The second idea is not that common of a use case, but I think the first one is definitely.

1 Like

+1 to be able to define a numerical value to not go negative so I don’t have to have a “if value == 0” everywhere.

Figma already does rounding, but it’s always 2 decimals.
0.115 rounds to 0.11, 0.116 rounds to 0.12

As for min and max number, I think that’s something I’d prefer defining per item. I think it might be a bit hard to figure out bugs if you’re not expecting it.

Oh true you’re right about the 2 decimal point thing, I just used it as an example. My idea was more that you could set a numerical variable to be integers only, i.e. it rounds up to a full number.

Hey @Marie_Rang, thanks for the feedback!

We’ll pass this onto our team for future consideration.