Format Field as Currency

Questions related to using nuBuilder Forte.

Format Field as Currency

Unread postby mrlizard » Fri Apr 16, 2021 3:55 am

Hello, I recently installed nubuilder on Ubuntu and I'm trying to import an existing set of data in csv format. Its worked so far but I can't figure out how to get one of the columns to be formatted as currency automatically. From what i've read the way to do this is to specify a nunumber field on the form, but even creating a fresh test form and table with a nunumber field on fastform it doesn't work, on the test form if i put in $123.45 it formats it as 123.4500. Is there something I need to change to get this to work?

Thanks in advance.
mrlizard
 
Posts: 16
Joined: Fri Apr 16, 2021 12:57 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby kev1n » Fri Apr 16, 2021 4:06 am

Hi,

Is the correct number format set ? (This dialog can be opened by double-clicking the object's label)

format.png
format.png (21.41 KiB) Viewed 124 times
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby mrlizard » Fri Apr 16, 2021 4:12 am

That field is blank for me.

ss_empty_input.jpg
ss_empty_input.jpg (40.65 KiB) Viewed 123 times
mrlizard
 
Posts: 16
Joined: Fri Apr 16, 2021 12:57 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby kev1n » Fri Apr 16, 2021 4:18 am

There should be 2 default formats already (2 rows in the table zzzzsys_format)

Open the Format Builder and check if you see any formats there. If not, create it.
format_builder.png
format_builder.png (20.07 KiB) Viewed 122 times


You can also run this SQL on the DB to have it created:
Code: Select all
INSERT INTO `zzzzsys_format` (`zzzzsys_format_id`, `srm_type`, `srm_format`, `srm_currency`) VALUES ('nu59e28f061a779da', 'Number', '$ 1,000.00', '[\"$\",\",\",\".\",\"2\"]')
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby mrlizard » Fri Apr 16, 2021 4:24 am

This is what i have for input formats, I actually created the fifth "Number" type that is basically a copy of the first one, just in case.
Attachments
ss_inputformat_nubuidler.jpg
ss_inputformat_nubuidler.jpg (58.63 KiB) Viewed 120 times
mrlizard
 
Posts: 16
Joined: Fri Apr 16, 2021 12:57 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby kev1n » Fri Apr 16, 2021 4:31 am

That is really odd. When you create a new object, is the dropdown also empty?
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby mrlizard » Fri Apr 16, 2021 4:36 am

Yes its still empy.

To clarify I went to Setup->Objects->Add

Then I clicked on the Input tab and selected nuNumber for the Input Type (and class).
mrlizard
 
Posts: 16
Joined: Fri Apr 16, 2021 12:57 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby kev1n » Fri Apr 16, 2021 4:39 am

Can you verify that the SQL is there? Double-Click on Format, switch to the tab "Select".
Attachments
select_sql.png
select_sql.png (35.39 KiB) Viewed 116 times
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby mrlizard » Fri Apr 16, 2021 4:44 am

Yes its there, I checked on a newly created one and on an existing one.
mrlizard
 
Posts: 16
Joined: Fri Apr 16, 2021 12:57 am
nuBuilder Version: 4.5

Re: Format Field as Currency

Unread postby kev1n » Fri Apr 16, 2021 4:54 am

Could you dump your db and send it to me? Then I can check whether I am also experiencing the issue.
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Next

Return to General

Who is online

Users browsing this forum: oli and 16 guests