Hi. I’m using data from an API which produces a number as a decimal which I want to convert to display as a percentage.
For example… The API returns 0.093434 into the text box I created but I want to multiply it by 100 to show as 9.3434 (and add the % symbol onto the end)
I’ve got a couple of issues trying to follow here… How did you get the number formatting box to appear?
And also I seem to be only make this field type option appear on an input rather than straight text box. (both will display the number feed from the API)
I added the input box after reading your first reply as a way to test the app, so it’s not really what I’m trying to achieve anyway.
I don’t actually want an input box, as there’s nothing I want the user to input. I just want for Bubble to bring in the number from the API as a plain number… but I want to convert that number into a percentage.
The second screenshot is more what I’m trying to work with if possible?
You don’t have a chance to get value from a text. Maybe there is a plugin for this.
The simplest version of your request is:
Place the value from the API in the Initial Content field in the input. Then shrink the input so that it does not disturb the design, for example 1px x 1px and hide the input with "This element visible on page load " (uncheck)
I edited the sample. Please look again.
I need to get out now. I can’t answer quickly if it doesn’t help.
Ok, thanks for your help. I’m brand new to this and the most I’ve coded are scripts with Google Sheets (though mostly copy/pasted). Obviously with Google Sheets you can run all sorts of math functions to then be displayed on a cell. So I guess I’m tryin to replicate that onto a website instead.
It makes me wonder if there is a way to call the API data into some kind of back end of Bubble.is so that I can do with that data as I please and it then be displayed in it’s final form on the front end.