Commas (or whatever) in number fields.

Moderators: Phil Winkler, Graham Smith, Pete Tabord

Commas (or whatever) in number fields.

Postby Pete Tabord » Mon Dec 13, 2010 10:35 am

It was pointed out to me that all number fields in Ff have commas (or whatever) - i.e. they are formatted with the 'numeric separator'. (I'm not talking about the decimal point, obviously)

I can't recall if this was the case in DFD, but it strikes me as rather odd - shouldn't it be only currency fields? Or should it be an option on any numeric field (not numeric string which has its own formatting options?

Also, shouldn't you be able to edit the length of a currency field?

Or am I just missing something obvious?

Your comments, please!
Peter J. Tabord
Head of Development
Database Software Ltd.
ptabord@ffenics.com
Pete Tabord
 
Posts: 1881
Joined: Fri Sep 07, 2007 12:48 pm
Location: Caernarfon, Gwynedd, UK
Has thanked: 0 time
Been thanked: 3 times
 

Re: Commas (or whatever) in number fields.

Postby benjji » Mon Dec 13, 2010 12:37 pm

a bit of a bugger if you need to do a csv file export !
benjji
 
Posts: 167
Joined: Fri Mar 14, 2008 11:26 am
Location: Stoke-on-Trent & Manchester & Middlesborough
Has thanked: 0 time
Been thanked: 0 time
 

Re: Commas (or whatever) in number fields.

Postby Phil Winkler » Mon Dec 13, 2010 1:02 pm

In DFD the commas are displayed in the form and in the format of reports. If you create an export using Mail-Merge the commas are not included in the data. This seems appropriate.
Phil Winkler
PLM Consulting, Inc.
pwinkler@plmconsulting.com
Phil Winkler
 
Posts: 889
Joined: Fri Sep 07, 2007 12:45 pm
Has thanked: 0 time
Been thanked: 0 time
 

Re: Commas (or whatever) in number fields.

Postby Pete Tabord » Mon Dec 13, 2010 1:17 pm

The commas are purely part of the mechanism that formats data for display. They don't affect exports or calculations or anything.

Normally, I suppose, it makes no difference, and if the number is a whole number it can always be displayed as a numeric string if the commas are not required. (I'm thinking of things like reference numbers that we would not normally write with thousands separators - but then I suppose they aren't really numbers in the mathematical sense and are correctly numeric strings in the first place).
Peter J. Tabord
Head of Development
Database Software Ltd.
ptabord@ffenics.com
Pete Tabord
 
Posts: 1881
Joined: Fri Sep 07, 2007 12:48 pm
Location: Caernarfon, Gwynedd, UK
Has thanked: 0 time
Been thanked: 3 times
 

Re: Commas (or whatever) in number fields.

Postby KjetilUrne » Tue Dec 14, 2010 2:36 pm

Pete Tabord wrote:They don't affect exports or calculations or anything.
Normally, I suppose, it makes no difference, ...



Well, actually sometimes it can be quite annoying. Ie, if using "Copy special" and pasting into other programs.

It would be neat if a "thousands separator yes/no" could be part of the field properties.
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: Commas (or whatever) in number fields.

Postby JohnBaldwin » Tue Dec 14, 2010 4:41 pm

KjetilUrne wrote:It would be neat if a "thousands separator yes/no" could be part of the field properties.


I would support that 'request' / suggestion. DfD allows a, say 8 digit, integer to be output (not just exported) with or without the comma(s) - it's part of the output field's properties.
John Baldwin (029 2055 4457)
JohnBaldwin
 
Posts: 221
Joined: Wed Sep 26, 2007 8:58 pm
Location: Cardiff, UK
Has thanked: 0 time
Been thanked: 0 time
 

Re: Commas (or whatever) in number fields.

Postby Adrian Jones » Tue Dec 14, 2010 5:27 pm

Should this be a field property, though?

Why not a document property (or documents and exports) so that it applies to all number fields, rather than having to go through one at a time.

Then in the rare and perhaps odd situation where you might want a few of a set of numbers to be output in a manner other than the other fields, you could use a text field with numtotext, or similiar.
User avatar
Adrian Jones
 
Posts: 2000
Joined: Tue Sep 11, 2007 2:38 pm
Location: Cornwall, UK
Has thanked: 5 times
Been thanked: 4 times
 

Re: Commas (or whatever) in number fields.

Postby KjetilUrne » Wed Dec 15, 2010 7:48 am

I don't have any strong feelings on this one, Adrian. Keeping it as a document property would surely make it easier to maintain, so in most of the cases this would be the preferred solution.
KjetilUrne
 
Posts: 602
Joined: Mon Oct 08, 2007 8:21 am
Location: Norway
Has thanked: 4 times
Been thanked: 1 time
 

Re: Commas (or whatever) in number fields.

Postby Pete Tabord » Thu Dec 16, 2010 8:26 am

Well, my original thought was that comma insertion should apply only to 'currency' fields, but that would also require that currency fields be editable for length - though they should default to what they always have. I don't really see the purpose of currency fields as they stand at the moment.

I'd have thought that if we make it a specific property, it should be a property of the field - or more accuratly the display object - but that there should also be a document (or application) level option to set the default.
Peter J. Tabord
Head of Development
Database Software Ltd.
ptabord@ffenics.com
Pete Tabord
 
Posts: 1881
Joined: Fri Sep 07, 2007 12:48 pm
Location: Caernarfon, Gwynedd, UK
Has thanked: 0 time
Been thanked: 3 times
 

Re: Commas (or whatever) in number fields.

Postby Adrian Jones » Thu Dec 16, 2010 10:12 am

if it's possible/do-able to fine-tune the output by starting with an application-wide setting that can be overridden on a document by document basis, and with the option to change individual fields as needed within that document, that definitely gets my vote!
User avatar
Adrian Jones
 
Posts: 2000
Joined: Tue Sep 11, 2007 2:38 pm
Location: Cornwall, UK
Has thanked: 5 times
Been thanked: 4 times
 

Re: Commas (or whatever) in number fields.

Postby Graham Smith » Mon Dec 20, 2010 2:50 pm

It is ironic that DFD had more options when it came to formatting a number field in a report than either DFW or Ffenics have. I had rather hoped that after all these years we would now be able to format a number field in much the same way as has been available in other programs since almost the beginning.

The concept (if not the execution) is fairly simple, fields should have "masks" that control the way they are displayed without effecting the way they are stored. A simple example of a mask would be something like the NumToText() ELF.
Graham Smith
DataSmith, Delaware
"For every expert there is an equal and opposite expert.", Arthur C. Clarke (1917 - 2008)
"X-Clacks-Overhead: GNU Terry Pratchett"
User avatar
Graham Smith
 
Posts: 2501
Joined: Fri Sep 07, 2007 11:31 am
Location: Delaware, USA
Has thanked: 0 time
Been thanked: 1 time
 
 

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron