Normal Topic Merging Numeric Fields (Read 822 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Merging Numeric Fields
Apr 12th, 2012 at 11:22am
Print Post Print Post  
Hi -

I have a database with 3-digit apartment numbers that is formatted as a numeric field.

When I merge (in a merge document) the Apartment # instead of getting 101, I get 101.00000000

I'm in a hurry to do the merge and "I FERGIT" .. What do I need to do to get rid of the decimal point and 8 zeros?

Thanks for your help.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Merging Numeric Fields
Reply #1 - Apr 12th, 2012 at 12:45pm
Print Post Print Post  
Unless you are doing math on the apartment number, I'd strongly suggest that you use a text field instead.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Merging Numeric Fields
Reply #2 - Apr 12th, 2012 at 1:16pm
Print Post Print Post  
Hi -

In this particular case, I believe that might be a simple solution and I believe it will still satify my needs.  Thanks!

However, there are times that I want to use numbers for "sorting" purposes, i.e. I want 20 to come before 101.  In those cases, what would I do?

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Merging Numeric Fields
Reply #3 - Apr 12th, 2012 at 4:59pm
Print Post Print Post  
Either just go ahead and use a numeric (if you are doing numeric operations on them - like a numeric sort), or use a leading zeros and fixed size - stripping them off before other uses. If you must use a numeric in a word merge, use Word's merge field switches to set the formatting however you would like.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Rick_R
Full Member
***
Offline



Posts: 243
Joined: Jan 29th, 2010
Re: Merging Numeric Fields
Reply #4 - Apr 12th, 2012 at 9:35pm
Print Post Print Post  
There's also a related problem with using numerals for apartment "numbers".  Some complexes will use "a", "b", etc.  It's not common and you could go quite awhile without running into it but it does occur.  And unless you know the numbers will never change (i.e., you are writing the program for a specific apartment complex), you should use at least 4 characters, since many complexes use 4-digit numbers.
  
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Merging Numeric Fields
Reply #5 - Apr 12th, 2012 at 9:41pm
Print Post Print Post  
Rick -

Thanks for your input.

Actually, I designed this for a specific complex and - if an when I wish to do one for another complex - I will simply copy this one and make whatever changes are needed.

Actually, we do have the letter "A" for one building and I was using a "substitute" until I decided how I wanted to handle it.  That building is 12A (in lieu of 13).

In any event, I wasn't completely thrilled with the earlier recommendations, so here's how I resolved it.

I made the Bldg and Condo Unit a TEXT field as had been first suggested.

HOWEVER, I added a "shadow" field that was numeric and used solely for sorting purposes.  So now I can sort on the sortBldg# and use 13 but do whatever work is needed using the text field (so what the users see is 12A).

Thanks for all the help guys.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Merging Numeric Fields
Reply #6 - Apr 12th, 2012 at 10:18pm
Print Post Print Post  
SpencerWulwick wrote on Apr 12th, 2012 at 1:16pm:
Hi -

In this particular case, I believe that might be a simple solution and I believe it will still satify my needs.  Thanks!

However, there are times that I want to use numbers for "sorting" purposes, i.e. I want 20 to come before 101.  In those cases, what would I do?


Use Word mergefield switches to format the number int he merge document.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merging Numeric Fields
Reply #7 - Apr 13th, 2012 at 3:31am
Print Post Print Post  
Another option is to use one of the latest versions of WordMerge (versions 2.5 Nov 2008 and 3.0 Apr 2010).

They will produce formats in the Word document that exactly match the way they appear on the Sesame form, without needing to setup mergefield switches in Word. So, even a true number field that is formatted to display zero decimal digits on the Sesame form, will have zero decimal digits in the resulting merged Word document.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged