AnsweredAssumed Answered

Combining Fields and Exporting to a text file

Question asked by JackRackham on Dec 15, 2009
Latest reply on Dec 22, 2009 by JackRackham

Title

Combining Fields and Exporting to a text file

Post

Hello,

I just registered on the forum, so let's talk a little about me: I work for a company in the press business. FileMaker is widely used in the company, mostly for really simple databases. I have some "advanced" experience with FileMaker but I'm more a MySQL/PHP developer.

I'm actually working on another simple application (single table, 30 fields, no relations) that will allow the final user to make some manual data entry and then export the data into a text file, ready to be imported in Quark Xpress.

 

> 1. The version of FileMaker Pro you are using.

FileMaker Pro 10.0v3

 

> 2. The operating system and version you are using.

I'm on Microsoft Windows Vista SP2, but the application will be used on Apple Mac OSX Snow Leopard.

 

> 6. Please indicate whether your database file is being shared over a network

Actually not, but in the future it will probably be shared to allow multi-user data entry.

 

This is approximately the structure of my FM database (I will user other names for the fields, because the original names are not in english):

 

ID

Genre (actually only 3 different genres are available as a value list)

Field1

Field2

Field(...)

Field30

ToBePublished

 

 

I need to export these fields into a txt file on a single row, so I added another field called "ToBePublished" that actually it's a concatenation of the other fields (Genre & " " & Field1 & " " & Field2 & " " & Field(...) & " " & Field30).

 

When I export the records, obviously, the field "Genre" is repeated for every record, like this:

 

Genre1 Field1 Field2 Field(...) Field30
Genre1 Field1 Field2 Field(...) Field30
Genre1 Field1 Field2 Field(...) Field30
Genre2 Field1 Field2 Field(...) Field30
Genre2 Field1 Field2 Field(...) Field30
Genre2 Field1 Field2 Field(...) Field30
Genre3 Field1 Field2 Field(...) Field30
Genre3 Field1 Field2 Field(...) Field30
Genre3 Field1 Field2 Field(...) Field30 
 

What I need to do is to export all the records, grouped by Genre, where the Genre only get published one time for each group. Example:

 

Genre1
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Genre2
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Genre3
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30
Field1 Field2 Field(...) Field30

 

Grouping the results by Genre it's not a problem, I already fixed this.

 

What I'm not able to do is to export the data formatted as above (the resulting file will be imported into Quark Express with no need for human interaction)

 

Anyone can help me or point me in the right direction (probably this is an easy one, but I'm kind of confused!)

 

Thanks a lot for you attention,

Dario

 










Outcomes