Groups > Databases > Filemaker > Re: Text File Output




Text File Output

Text File Output
Fri, 21 Mar 2008 07:48:40 -070
Hi There

I once again call upon you Filemaker experts to help me solve a
problem ;-)

I need to export the fields from one record in my database and upload
the resulting text file to another database.  At the moment the
external database does not want to accept the files. I am currently
working on the formats etc so that there shouldn't be any problems on
that side.  However the database administrator has given me an example
file as below:

ABC.txt
"123";"1";"C01"
"123";"2";"C02"
"123";"2";"D17"

Where 123 Represents a number field automatic serial number.

However in my Filemaker database the serial number field represents
one single job and therefore one record.  When I export the data at
the moment the resulting text file is displayed as below:

ABC.txt
"123";"1";"C01";"123";"2";&quo
t;C02";"123";"2";"D17"

Do you think that this is why the external database will not acept my
text file.  If so (dare I ask) is there a simple way around it.

Post Reply
Re: Text File Output
Fri, 21 Mar 2008 09:36:19 -070
On Mar 21, 7:48 am, JayBee <Jennifer_Beecr...@hotmail.com> wrote:
> Hi There
>
> I once again call upon you Filemaker experts to help me solve a
> problem ;-)
>
> I need to export the fields from one record in my database and upload
> the resulting text file to another database.  At the moment the
> external database does not want to accept the files. I am currently
> working on the formats etc so that there shouldn't be any problems on
> that side.  However the database administrator has given me an example
> file as below:
>
> ABC.txt
> "123";"1";"C01"
> "123";"2";"C02"
> "123";"2";"D17"
>
> Where 123 Represents a number field automatic serial number.
>
> However in my Filemaker database the serial number field represents
> one single job and therefore one record.  When I export the data at
> the moment the resulting text file is displayed as below:
>
> ABC.txt
>
"123";"1";"C01";"123";"2";&quo
t;C02";"123";"2";"D17"
>
> Do you think that this is why the external database will not acept my
> text file.  If so (dare I ask) is there a simple way around it.
>
> :-)

I would expect to see a carriage return between each record. Without
that, your external database very well might think there's only one
record in the file. What file format are you exporting in?

Post Reply
Re: Text File Output
Fri, 21 Mar 2008 14:14:51 -070
Hi  Kevin

Yes exactly there is a carriage return between each record but in my
database all the information for one job is stored in one record so it
will be displayed as follows:

"123";"1";"C01";"123";"2";&quo
t;C02";"123";"2";"D17" - then on to the next
record
"234";"1";"C02";"234";"2";&quo
t;C35";"234";"2";"C56"

However in the external database they store details of one job in four
parts as follows:
JobDetail1
JobDetail2
JobDetail3 &
JobDetail4

So for example in their database table 'JobDetail1' would have records
as follows:

JobDetail1.txt
"123";"1";"C01"
"123";"1";"C02"
"123";"2";"D17"
"234";"1";"C02"
"234";"2";"C35"
"234";"2;"C56"

Therefore I need to know if it is not possible to export my data in
the format as above i.e. all on one line then is there a simple way
around it.

The file format is Comma Seperated Value text file (if that's what you
mean) but I have been asked to replace commas with semicolons once it
is in the text file.

Many Thanks
Post Reply
Re: Text File Output
Fri, 21 Mar 2008 16:09:15 -070
Harry

That is brilliant - that is the kind of intellegence that I am looking
for :-).

I thought about putting a return character in the necessary places but
wasn't sure how to go about it.  It is going to take a while but if it
works - great!

I am using notepad for the text output so do you know what the return
character is in that.

Many Thanks
Post Reply
Re: Text File Output
Fri, 21 Mar 2008 22:55:42 -070
On Mar 21, 4:53 pm, Helpful Harry <helpful_ha...@nom.de.plume.com>
wrote:
> In article
> <c632a7b6-d19e-4409-bde6-8e3cd62c9...@i29g2000prf.googlegroups.com>,

> Since you already have to post-process the file to replace the commas
> with semi-colons, you may as well also add in some Return characters
> too.

> Export these fields instead of the original ones. Then once you've got
> the text file you can use a word processor to find / replace the
","
> with ";" and then find / replace "*-*" with a Return.
You may need to
> copy a Return from another file by selecting from just after the last
> character of one line to the just before first character of the next
> line. In Microsoft Word you can simply type "^p" without the
quotes for
> a Return character. Other word processors may have a similar tag, some
> use "/p" or "\p".

I'd just create a one field utility table and generate the exact data
I want in each row and put it in the one field.

e.g. The loop through the jobdetails records to export, and generate n
records in the utility file setting the fields exactly as below, the
way you want it, with the semi-colons, etc..

"123";"1";"C01"
"123";"1";"C02"
"123";"2";"D17"
...
and then create n more records for the 2nd job, etc.

And then at the end, just export the utility table records as a TAB
file, which because there is only one field will output the contents
of each row 'as is', and give you the exact output format you need,
without fiddling around with a word processor after the fact.

Really, what is the point of scripting a solution and then manually
adjusting the results by hand when you can get exactly what you want
right out of filemaker?

-best regards,
Post Reply
<< Previous 1 2 3 4 5 Next >>
( Page 1 of 5 )
about | contact