7 Replies Latest reply on Feb 20, 2014 8:21 AM by philmodjunk

    Copying standard letters?

    Maaike

      Title

      Copying standard letters?

      Post

           Hi all,

           I'm having the following problem: 

           I created a 'standard letter' with merge fields. The purpose of this letter is to be able to copy it entirely and then paste it into another database (it is a database for a doctor in my hospital, she wants to copy paste it into the bigger hospital database).

           When I copy the letter and then paste it, only the data from the merge fields appear, and not the sentences I put in the standard letter design. 

           I've added a screenshot of the layout with visit details of a fictional patient.

            

      Visit_details.jpg

        • 1. Re: Copying standard letters?
          Maaike

               Here you can see the layout of the letter and the letter in layout mode.

          • 2. Re: Copying standard letters?
            Maaike

                 And this is the structure of the database.

                 (I had to post it in 3 times, don't know how the add 3 images at once)

                 I am really new with Filemaker, so I guess the solutiobs I had look kind of 'creative'.

                  

                 Hopefully you can help me with this,

                  

                 Thanks,

                 Maaike

            • 3. Re: Copying standard letters?
              philmodjunk

                   This would seem something that can directly replicated with the "template" method shown in the demo file.

                   You'd enter what is now a combination of layout text and merge fields into a text field with "Field place holders" instead of merge fields. Then a calculation field that uses Substitute can substitute the values of the fields for the place holders in the text field to produce the same message you now have on its own layout. Since this is a calculation field, you can copy and paste the contents of the field into a different application if that is truly necessary.

              • 4. Re: Copying standard letters?
                GuyStevens

                     Hwo would you like to put this data into the other database?

                     Can she store a pdf?

                     Or do you just simply want to copy this whole letter as one block of text and then paste it in one text field?

                      

                     Greetings

                     Guy Stevens

                • 5. Re: Copying standard letters?
                  Maaike

                       Hey Guy,

                       I'd like to copy the whole letter an then be able to paste it into, let's say a word file or another database's 'blank page'

                       Thanks,

                        

                       Maaike

                        

                  • 6. Re: Copying standard letters?
                    GuyStevens

                         As suggested in my video I sent to you I would make one big calculation field that contains both the labels and the data from the fields.

                         You can then copy the entire calc field and paste it somewhere else.

                    • 7. Re: Copying standard letters?
                      philmodjunk

                           Guy, that's also the method used in the demo file I shared here. I think the issue is to successfully make the transition from "demo" to "actual file".

                           You'd type in the text from your screen shot ("Dear Collegue,....) exactly has you have it on the layout, but you can use something like <<PatientName>> in place of Patients::cFirstNameLastName>> as the place holders don't have to be exact field references. They just need to be unique.

                           Then there's a calculation field: cMessage--defined in the Message table that can be updated to read as:

                           Substitute ( Templates::TemplateText ; ["<<PatientName>>" ;Patients::cFirstNameLastName] ; ["<<Anamnesis>>" ;MainVisit::Anamnesis ] ; [ "<<HomeMedication>>" ; MainVisit::HomeMedication ] ; ["<<ClinicalExam>>" ; ClinicalExam ] ; ["<<MedAfterVisit>>" ; MainVisit::MedAfterVisit ] ; [ "<<Conclusion>> ; MainVisit::Conclusion ] )

                           The other key detail needed will be a relationship linking MainVisit to records in the Messages table:

                           MainVisit::MainVisitPK = Messages::MainVistFK

                           That will require adding a field that you do not yet have in the MainVisit table.