Normal Topic Number field to whole number (Read 532 times)
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Number field to whole number
Jul 15th, 2006 at 4:53pm
Print Post Print Post  
I have invoice_No defined as a number field and need to export to an ascii file without the decimals. I think this has been covered but my searches didn't find it. What is the best way to accomplish this ?
Harley
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Number field to whole number
Reply #1 - Jul 16th, 2006 at 3:55am
Print Post Print Post  
Numbers are exported with six decimals.

I can think of 2 possible solutions:

1.  How about copying the number to a text element and exporting the text element instead?
2.  Instead of using built in Export, you could use write some programming using FileWrite to create the export file instead?  If you do that then you can format the data any way you want.  You may run into similar issues with date formats.

I think option 1 is much easier, and would be my first choice.

And other options are available depending on what you are doing.  If the export file is being imported into a Word Merge or Excel or OpenOffice.org file for example, then those programs can be used to reformat the results.

Hope this helps....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Re: Number field to whole number
Reply #2 - Jul 16th, 2006 at 2:45pm
Print Post Print Post  
Thanks Bob

I decided to go with another LE on the form which I made not visible and programed to convert the Invoice_No to STR.
The ASCII file is used by a fulfillment center and they couldn't handle the decimals.

Harley
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Number field to whole number
Reply #3 - Jul 16th, 2006 at 6:29pm
Print Post Print Post  
Glad you have it working Harley.

(Need any more quarters?)
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged