6 Replies Latest reply on May 4, 2011 3:08 PM by RC1

    Transfer sections of text from a word document to Filemaker Pro fields

    RC1

      Title

      Transfer sections of text from a word document to Filemaker Pro fields

      Post

      Hello,

      I have a large word document with over 3,000 pages. It is a log with daily entries with a date to start each day and below the date are multiple segments with text, each starting with the designation, “DVD.”

      Word Document Example:

      04/06/2011

      DVD

      -The Daily Show

      Billy Crystal

      -The Colbert Report

      Lady Gaga

      DVD

      -WH Obama

      Apr 6, 2011 

      Program ID 298870-1

      Category

      Public Affairs Event

      Format

      Interview

      Location

      Washington, District of Columbia, United States

      Date Aired

      Apr 6, 2011

      04/07/2011

      DVD

      -CBS News

       

      -MSNBC News

       

      DVD

      CNN News

      I would like to transfer specific text sections from the Word document into FileMaker Pro records.

      Each “DVD” entry with the text below would go into a separate FileMaker Pro record, into the field named “Description” and it’s designated date (the date preceding it) would be put into the filed named ”Date” of the record.

      So from the above word document example, the following FileMaker Pro records would be as follows:

      Record 1 would have:

      Date field:

      04/06/2011

      Description field:

      DVD

      -The Daily Show

      Billy Crystal


      -The Colbert Report

      Lady Gaga

      _________________________________

      Record 2 would have:

      Date field:

      04/06/2011

      Description field:

      DVD

      -WH Obama

      Apr 6, 2011 

      Program ID 298870-1

      Category

      Public Affairs Event

      Format

      Interview

      Location

      Washington, District of Columbia, United States

      Date Aired

      Apr 6, 2011

       _________________________________

      Record 3 would have:

      Date field:

      04/07/2011 

      Description field:

      DVD

      -CBS News


      -MSNBC News

      _________________________________

      Record 4 would have:

      Date field:

      04/07/2011

      Description field:

      DVD

      CNN News


      (each date is highlighted in a purple color in the word document)

      Is this possible to do in some sort of automated way (not manually by cutting and pasting) and how would I do that?

      I read something about a plug-in called 360Works Scribe but don't realy know anything about it.

      Thank you very much for anyone’s help on this!

        • 1. Re: Transfer sections of text from a word document to Filemaker Pro fields
          philmodjunk

          If you save this file from Word as Text and then import the text into FileMaker with the Tab delimitted text option, you can import the text into a table where each "paragraph" in word is imported into the text field of a different record in the table.

          A script could then loop through your records and extract the desired date and text, entering it into a series of new records.

          It would appear that checking this text field in each record for "DVD" would serve to detect the start of each new record.

          • 2. Re: Transfer sections of text from a word document to Filemaker Pro fields
            RC1

            Hello,

            Thank you very much for the information.

            I did a test transfer but I'm missing the details of how to do this.

            I saved the word doc as Text only and then made a new Filemaker data base and tried to import the text but I am not able to do it. i also do not see where/when to select Tab delimited text option when importing. Do i set up target fields before i do the first importing?

            Sorry I can't figure out the details. I thought I used to be able to save the word document as tab -delimited text first and then import into filemaker but i don't see that choice when saving the word doc.

            Also, i have not used a script before. Is that another app or plug in and where do i get this?

            Any details would be very much appreciated.

            Thank you.

            • 3. Re: Transfer sections of text from a word document to Filemaker Pro fields
              philmodjunk

              Scripts are created in Manage Scripts in FileMaker. No plug in needed.

              If you have never created a script before, this may not be the best choice for the first script that you try to create. You may want to try some simpler scripts first and then try this one once you have a better understanding of how it's done. If you plan on doing your own database design, this will be well worth your time as the things you can do with your database are pretty limited until you can create scripts to automate what you need to do with your database.

              You can create a table for you import first and then import the text into this table or you can create the table as part of the import. I'd create the table first if I were you as I can then give the new fields in the table names that make sense to me instead of getting generic field names like fld1, fld2, etc.

              To import records, go to a layout for the table into which you plan on importing the data and then Select Import Records from the File menu. In the dialog that pops up, select files of type "Tab delimitted". Then find and select the text file you created by saving from Word for import and follow the steps from there.

              If you do not first create a table, you can pull down the Target drop down and select new table. This way the import creates a new table, but when you import text, this leaves you with the generic field names I described earlier, so it's not an option I would use if I were you.

              Import Records has a lot of options, so it's a good idea to read up on it in FileMaker help before you try to use it.

              • 4. Re: Transfer sections of text from a word document to Filemaker Pro fields
                RC1

                Hello,

                Thank you for more information on the process. I will have to read about scripts and try it out. i know nothing about scripts. One thing that I am thinking will be complicated is to get the date that is stated only once, to apply to several different sections that follow until the date changes again. Also, how to designate for a new record to start everytime "DVD" appears and finish when another "DVD" appears again or when the next date appears.

                If there is any easy instruction about those things, i'd appreciate knowing but i suppose this is a complicated thing that requires knowing much more about scripts before i may understand it.

                Thanks very much again for the instruction you've genrously provided me already! if there is anyone who wants to expalin more please add to this post.

                • 5. Re: Transfer sections of text from a word document to Filemaker Pro fields
                  philmodjunk

                  You are taking on a pretty challenging task when you haven't written scripts before. You may want to spend some time playing around with various simpler scripts before you take on this project.

                  For dates, your example shows one date for every record, (in the final table, not the imported data), so that shouldn't be an issue, you'd just enter the date in the date field and then populate the text field with the remaining data. Your loop can append data to the end of what is already present in the text field from the previous line of text.

                  Your loop can use an If step to check to see if the next line of text is DVD and if so, creates a new record. Your example shows DVD as the flag for starting each new record. If that's the case, there's no need to check for the date.

                  If that's not the case and you also have to check to see if the text forms a valid date, things get a bit more complicated but it can be done.

                  • 6. Re: Transfer sections of text from a word document to Filemaker Pro fields
                    RC1

                    Hello,

                    Thanks for the added clarification on the date and DVD sectioning. I can see I have a lot of studying to do and it will be complicated. If I can't figure it out, I'll see if someone can help me from there.

                    I really appreciate all the help on this! You have been very generous.

                    Thank you very much!