[Breaking Change] Inputs with a number format now take a number as initial content

It’s happening to me as well.

I have a whole load of fields that are negative numbers, but the new version considers them as texts and marked as errors. I use these in some calculations and would be a real pain to redesign.

Screenshot 2021-03-08 at 15.35.56

@dee So, are you saying that no negative numbers can be used in the new version? If so, that’s a huge problem.

1 Like

As far as I’ve tested, yup :(. big problem for me too. I tried @Lucien 's suggestion to click on the expression, but it didn’t fix it.

Hi All, thanks for the questions! I’ll try to answer as many as I can, feel free to reach into support with specific issues if you are still having trouble.

@boston85719 Because the :formated as operator returns a text, it can’t be used here without converting it back to a number. So you could use :converted to number, but then you would have the same problem of messing up in different locales (since that would do locale-aware parsing, just like the old v11 version of inputs). So, what I would recommend is using the :rounded to operator (link) to limit the number of decimal places but leave the type as a number.

@rio (and anyone else having issues pop up) the way to fix these issues is to change the type of the expression in “initial content” to a number, rather than a text. Again, you can use :converted to number to do it the same way as we were doing it before if there is no other way, and the behavior won’t have changed from v11 if you add that to your expressions.

@dee The old expression was giving a text value of a “-” appended to the beginning of the number. Because we want a negative number, but not in text form, we can take the number and do * -1 instead to make it negative but leave it in number form.

Please let me know if you need anything else, and don’t hesitate to reach out to support for more in-depth issues!

9 Likes

Thanks @cal…never used the rounded to operator before

@cal It is my experience that :rounded to will not solve the problem of displaying a number as 1.00. It will only display as 1
Basically, it will not show any zeros to the selected decimal place beyond what is necessary.

So 1.10 displays as 1.1 and 1.00 as 1
Please advise.

Thank you Cal! Just had an “airbus” moment… I guess we DO learn something new every day :slight_smile:

@robert That’s a good point, didn’t think of that use case. I’ll see what I can do - in the meantime stay on version 11 if you rely on that functionality.

I can remove :formatted as from everything, add :rounded to to every single cell, those changes seem simple enough and offer a reasonable change that doesn’t seem to result in changes to the information…except I have a need for negative numbers to show in parenthesis. How is this now possible with the new changes?

Also, is anyone else experiencing the problem where once you refresh the page you are previewing and that page links to another page, when you click that link, that page you go to ALSO needs to be refreshed? This seems to be happening to me since the upgrade.

One other “breaking change” that I noticed is that if I don’t exit the Initial Content field properly, meaning it’s text is blue in color, then something breaks in the browser where I can no longer edit the Initial Content field unless I reload the page. I have to click enough times on the element editor until the Initial Content field has settled its score with me and turned the text blue before I can move onto the next edit.

This adds just one more twisting of the screw that this recent change has made to the environment.

@cal - Does there happen to be a formal changelog somewhere that can be browsed to understand all the changes packaged with a release or update?

Hello @kevin22 and welcome to the community!

You can check in settings/version

Releases | Bubble

1 Like

This is a breaking change indeed. There was a field where I had a conditional formatting put on. When certain condition is put in, the initial content value was defined as something.

But now that assignment itself is gone. i.e. The condition is still there, but what should happen when condition is true, is empty.

Interface had thrown few errors which when I clicked on the error, were disappearing by themselves. I don’t know whether that disappearance was for getting the error fixed automatically or removing those conditions itself!

Please clarify what happens when upgrade is done without any other fixes that are not highlighted by interface.

@cal why was this comment ignored by you while replying? I see that there are a few hearts here. That means there are other folks in the same boat and confusion as me.

Please give a clear and detailed reply.

@cal The :rounded to bit should not just be for the system to consider during calculations, but should also be exposed to the display. I believe that most of us that were using the :formatted as operator didn’t do it solely for calculations but for display purposes and :rounded to doesn’t honor that need.

Also, if :formatted as returns a text, how does that affect dates when dates need to be calculated? When adding months or years to a date that was previously formatted (i.e. keeping just the year, yyyy), if it’s a text, is that going to be an issue? If so, why or why not?

@cal have we tested this feature for empty “initial content” scenario?

I see a potential bug here.

In my case there are scenarios where I set initial content to empty in certain conditions. Those conditions are not being honoured at all!

Attaching a screenshot that shows this issue. You see that there is a condition which sets input value to be empty. You can see in the debugger that the condition value is true, but even then initial content is not empty!

This seems like a really poorly executed change with little clarity on implications and communications to the customers.

I also created a demo page to show this bug.

https://beegle.app/version-test/test-initial-content

You have a number input on top. The second number input’s initial value is first number minus 20. However, if first number is less than 20, then second number should be blank.

But you’d see that it doesn’t happen so.

Also missing in this update is the ability to set the visual style of negative numbers such as using parenthesis instead of a minus sign.