Math options in expression dropdown after :count

So most of the time it’s obvious what kind of data an expression currently evaluates to, which means the operators that can interact with that kind of data are obvious.

However, this is an example of when it’s not obvious and Bubble is cutting off an operation I need to do.

image

I’m counting the number of users who meet the filter criteria and putting it into a list of numbers. The problem is that a list of numbers won’t allow duplicate numbers. So what I want to do is add a few random decimal places to each number. That way they’ll be like 1.196, 1.149, 1.128 and so on so they’ll all be unique but won’t look different in the graph.

So what I need to do next is get some math operators, which should be possible because after :count the expression is a number, but it’s only giving me list options. I don’t want to manipulate the list after :count is added to it as an item, I want to further manipulate the number before it’s added as an item.

There should be math options in the dropdown.

Use a hidden input field, which is set to the count. Then pull that in and do math on it ?

I broke it up into (a lot) more steps to get around the fact that I couldn’t access math operators in the expression builder.

Actually, the first way I tried it was to generate random numbers, but it turns out those are random text, not numbers. So I tried to run them through an input set to “integer” to turn them into numbers. The weird thing is it worked perfectly, but only the first time. Input whatever’s value stayed the same first value forever even though I could see the number inside it changing to each new value.

So I gave up on that and instead I created an index (1, 2, 3, etc) then divided it by 10000 to create a decimal and added it to the actual count to make them unique. So they’re like A.0001, B.0002, C.0003, etc.

Anyway, the point is still that there should be math operators available when the expression’s current value could be a number.