Page 1 of 2

Format Field as Currency

Posted: Thu Apr 15, 2021 8:25 pm
by mrlizard
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.

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 8:36 pm
by kev1n
Hi,

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

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 8:42 pm
by mrlizard
That field is blank for me.
ss_empty_input.jpg

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 8:48 pm
by kev1n
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
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\"]')

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 8:54 pm
by mrlizard
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.

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 9:01 pm
by kev1n
That is really odd. When you create a new object, is the dropdown also empty?

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 9:06 pm
by mrlizard
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).

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 9:09 pm
by kev1n
Can you verify that the SQL is there? Double-Click on Format, switch to the tab "Select".

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 9:14 pm
by mrlizard
Yes its there, I checked on a newly created one and on an existing one.

Re: Format Field as Currency

Posted: Thu Apr 15, 2021 9:24 pm
by kev1n
Could you dump your db and send it to me? Then I can check whether I am also experiencing the issue.