Forum Academy Marketplace Showcase Pricing Features

Integer inputs: How do I get "," place value marker commas to appear?

(Example, 100,500 vs. 100500)

I’ve searched and searched through Bubble documentation and this forum, but still can’t figure it out.

Seems like a simple thing, but I can’t find the solution.

What you’re looking for is a way to format numbers. So in the drop downs, after a number field, you can pick formatted as and you’ll be able to find this option.

Emmanuel, thanks for your response; I should have been more clear…

The numbers I need to format are in user input fields.

This is what I am seeing when I set the field to “integer:” http://www.screencast.com/t/nBQLilRlqqz

@bubble3 The ‘Currency’ type does this automatically; but you need the commas to appear when the type is set to Integer as well, correct?

Hi Faye,

Yes, I need the commas to appear when the type is set to “integer.” (I don’t want to use ‘Currency’ type because I don’t want any currency symbols to appear.)

I’m not 100% sure, but I don’t think there’s a workaround for that since formatting can’t be adjusted for the inputs, aside from changing the input type?

Maybe there could be a checkbox option that would appear below once the type is set to Integer (such as: “Always show commas” :white_check_mark:)?

1 Like

If there’s no way to format inputs, there ought to be!!!

I wonder if there’s a way for me to allow users to select their currency type on a Setup page…

You can definitely do that. :slight_smile: For example, you could have the User select their currency from a dropdown on the page prior to entering a number into the input, or detect it from a “Currency” field stored within the User (not limited to those options).

Then, in the conditional formatting of the input, use a statement such as (When “Dropdown’s value is $ --> Currency = $”) or (When Current User’s Currency is “$” --> Currency = $").

1 Like

Faye,
On a separate “Settings” page, I created this:

Am I on the right track?

George

Hey George, are you trying to build a marketplace app with multiple currencies?

I’m building is a business intelligence app; one of the features is tracking cash flow. I’m US-based, but almost immediately, we had users in the UK. That’s why I need multiple currencies.

Ohh I see! I haven’t done this before, but I think you are on the right track. :slight_smile: (Considering your users are not selling anything and their currencies never need to be converted – only displayed).

In your application, does a User create a Business, and then other Users are able to be added to that Business in order to view its statistics? If so, you’d want to have the Currency Type within the Business, not the User.

Data Setup:

When a User is setting up a Business, and has selected a Currency Type from the Dropdown, they could click a button at the end to ‘Create Business’. In the workflow of that button you could then do two events:

  1. Create A New Business and Add the Current User to the Business’s Employees

    *You’d have more fields to change than what is shown above of course, but those are just two fields for this example. The User (most likely the Business Owner) will automatically be assigned as the Creator of the Business.

  2. Add the Business to the User

Data Structure:

*If you’d like to give Users the ability to be a part of multiple businesses, you would change that field to a List of Businesses instead.

Workflow:

Faye,

You make a good point about users.

For this version, I was going to have a single user for a single business.

But there may be situations in the future where you’d want multiple users linked to a single business.

I need to modify my database accordingly before I can get this currency setting to work.

Right now, all the financial data is linked to a single user.

Thanks for bringing this up!

No problem! Data structuring is tricky, but it sounds like you’re on the right track for sure! :slight_smile:

@bubble3 How did you get the currency symbols in your static list

I do not have these symbols on my keyboard. A google search suggested using Alt E for Euro does not work either

If your on Windows you can use the character map

On a Mac keyboard…

European Euro Symbol: € – Shift+Option+2
Japanese Yen Symbol: ¥ – Option+Y
British Pound Symbol: £ – Option+3

1 Like

Thanks so much @AliFarahat and @bubble3. Done - I am working on Windows so character map worked well

2 Likes

Faye,

I found another “fly in the ointment”!!!

There are some places in my app where numbers are displayed, but they are NOT currency numbers. They are quantities.
These quantities need the commas.

I’m going to have users select their currency in a Settings page.

But it appears that there’s no way around this one.

So I’m back to square one, for all practical purposes.

I guess Bubble wasn’t designed with presenting numbers in mind.

Bubble will do that :slight_smile: In the dynamic data, you can select the “formatted as…” option which will present you with the dropdown to choose a comma as the thousand separator: