1. Home
  2. SANDBOX
  3. Creating Letters in SANDBOX

Creating Letters in SANDBOX

There are three types of letters in SANDBOX. The Letters Help screen in both Inquiries and Families have a number of examples of each type. Each sample letter describes how to create a letter of the same type.

  1. Simple Letters—These letters incorporate merge fields in the address and salutation. The address and salutation are unique to each record but the body of each letter is the same for every record in the database.
  2. Merge Letters—These letters incorporate simple merge fields in the body text as well as the address area. For example, the name of the child might be incorporated into the body of the text as well as the grade for which he or she is inquiring.
  3. LetterBox Letters—These letters incorporate simple merge fields in the address area and the body text. Additionally, they can contain paragraphs that are unique to each record. There are eight existing Letterbox fields in SANDBOX, however more can be created.

This chapter will detail how to create these three letter types. For each type you will follow these steps (DRAE):

  • Duplicate an existing letter;
  • Rename the duplicate letter;
  • Attach the new, renamed letter to the Letters Org screen;
  • Edit the letter.

The letters you create for these exercises can be deleted later as they are for training purposes only. It is important that you do not edit the existing sample letters but leave them as they are so that you and others can refer back to them as needed.

Simple Letters

To create a Simple Letter that is addressed to the child and contains merged address and salutation data:

  1. From Inquiries click Letters in the top task bar. This navigates you to the Letters Org screen.
  2. Click the Letters Help button.

  1. Under Student, click on the Ex S Simple letter.

  1. Switch to Layout mode by selecting Layout from the FileMaker Pro View menu.

Merge fields can be identified (in Layout mode) in that they are enclosed by double chevrons, <<Field name>>. Notice the merge fields, <<NameFull>>, <<P1_address_full>>, <<Namefirst_final>>, and <<AdmDirName>>, have been inserted in the address area and the salutation.

To see the power of this technique, switch back to Browse mode and use the Book in the Status Area to move to a new record. Notice that as you move through the records in the database, the address and salutation information are different for each record yet the body of the letter is the same for every record.

Step 1: Duplicate a Layout
  1. Make sure you are on the letter layout that you wish to duplicate. In this case, it should be the Ex S Simple letter in Inquiries on the Letters Help screen.
  2. Switch to Layout mode.
  3. Select Duplicate Layout from the FileMaker Pro Layouts menu. You may not notice anything new but the existing layout has been duplicated and renamed with the original name and the wordcopy appended to it. In this case, the duplicated letter is named Ltr-Ex S Simple Copy.

  1. To verify this, click on the Layout menu below the Book. A list of all the existing layouts in the file will appear.

  1. Scroll all the way to the bottom. You will see your new layout listed as the last layout with a checkmark next to the name to indicate that you are currently on that layout. Make sure your cursor is on the Ltr-Ex S Simple Copy and release the cursor. This will return you to your new letter.
Step 2: Rename the New Layout

Now you need to give your layout a more meaningful name. Letters in SANDBOX start with the prefix Ltr-. To be consistent, your letter layout should follow the same convention. The name of the layout should indicate the letter’s purpose.

  1. In Layout mode, select Layout Setup from the FileMaker Pro Layouts menu.

  1. Type a name in the Layout Name area. For example, Ltr-Welcome.

  1. Make sure that there is NOT a check in the Include in layouts menus checkbox. This will remove your letter from the Layout menu while in Browse mode. You can always navigate to your letter from the Layout menu while in Layout mode but you want to keep the Layout menu uncluttered in Browse mode. Users will navigate to your letter via the Letters Org screen once you attach it with a button to the Org screen.
  2. Click OK. You will get a message warning you that some margins are not set correctly. You can ignore this warning and click OK. Your letter now has a name. You can verify this by clicking on the Layout menu as you did before while in Layout mode. Your new letter will still be at the bottom of the list but it will now reflect the new name.

Switch to Browse mode and click on the Layout menu. Notice that your new letter does not display in the menu while in Browse mode. Until you attach your letter to the Letters Org screen, you will have to switch to Layout mode to navigate to it.

Step 3: Attach Your New Layout to the Appropriate Org Screen

Letters in SANDBOX get connected to the Letters Org screen.

  1. In Browse mode, navigate to the Letters Org screen.
  2. Switch to Layout mode.
  3. With the Pointer tool, click once on an Unassigned button under the More column to select it. Four handles will appear around the button. If the button is locked—meaning the object cannot be edited or deleted—the handles will appear gray. If the button is unlocked, the handles will appear black. If you click anywhere else on the screen, the button will be de-selected.

  1. Make sure your button is selected and choose Unlock from the FileMaker Pro Arrange menu. The handles will turn black when they become unlocked. If your button is already unlocked, Unlock will not be an option you can choose.

  1. With the Pointer tool, double click on the button. The Specify Button dialog box will appear.
  2. Select Go to Layout under Navigation in the window on the left side of the dialog box.
  3. Click the Specify pull-down menu in the Options area on the right side of the dialog box. A list of all the layouts in the file will appear. In the next step, you will tell FileMaker Pro where the button should navigate the user when pressed.

  1. Select your new layout from the list. It will be at the bottom. For example, if you named your letter Ltr-Welcome, you will see it at the bottom of the list.

  1. Make sure that the Change to hand cursor over button checkbox has a checkmark in it. If it doesn’t, click in the checkbox. When the user moves his or her cursor over the button, it will indicate that it is indeed a button as the cursor changes to a hand icon.
  2. Click OK. You will be returned to the Letters Org screen. Now you need to rename the button to reflect the letter’s purpose.
  3. In Layout mode, select the Text tool from the Tool Pallet. Your Pointer becomes a cursor.
  4. Double-click on your button.  The name of the button will be highlighted. If not, double-click again on the name.
  5. Type the name of your layout. The name should reflect the letter’s purpose. For example, if your layout is named Ltr_welcome, name your button Welcome.

  1. Switch back to Browse mode.
  2. Click on your button. It will navigate you to your letter. You can use the buttons in the task bar as you normally do to navigate anywhere else in the solution.
Step 4: Edit the Layout

Now that you have a new letter layout that has a name and is connected to the Letters Org screen, you can edit the letter. For more details, see the article Working with Text.

  1. In Browse mode, navigate back to your letter using your newly created button on the Letters Org screen.
  2. Enter Layout mode.
  3. Using the Pointer tool, point to the body of your letter and click once to select it. Handles will appear around the block of text. Unlock it if necessary.
  4. Using the text tool, click into your letter and edit the body text as needed.

Merge Letters

In order to create letters with merged data in the body, you need to know which fields to use. The Name Flow screens in both the Inquiries and Families files will help you, as well as the fields on the Letters Help screen.

  1. From Inquiries click Letters in the top task bar. This navigates you to the Letters Org screen.
  2. Click the Letters Help button.
  3. Click on the Ex S Merge letter under Student.

  1. Switch to Layout mode. Notice that the field <<NameFirst_final>> is inserted into the body of the letter. To see the power of this technique, switch back to Browse mode and use the book icon in the status area to move to a new record. Notice that as you move through the records in the database the address and salutation information are different for each record as well as the child’s name in the body of the letter. You will use this letter as a template for creating a new merged letter.
  2. Follow steps 1-3 above for duplicating, renaming and connecting your new letter to the Letters Org screen before you edit it.
Inserting Merge Fields

Once you have successfully duplicated, renamed and connected your new letter to the Letters Org screen, you are now ready to edit the letter and insert new merged fields.

  1. In Layout mode use the text tool to edit the body of your letter. You may have to unlock the Text Object first.
  2. Place your cursor where you want your merge field to be located in the body of the letter.
  3. Select Merge Field from the FileMaker Pro Insert menu at the top of your screen.

  1. The Specify Field dialog box will appear with a list of all fields in the file.
  2. Choose the desired field from the Specify Field dialog box. The merge field will appear in your letter where you placed your cursor. You can also type the name of a merge field with enclosed chevrons instead of selecting Insert Merge field. Be careful not to insert any extra characters or spaces within the chevrons. Create space with the space bar before and after the field as you would with any word.

  1. Delete any merge fields that you don’t want.
  2. Switch to Browse mode and use the book icon to flip through the records one at a time to verify that your letters are formatted correctly. If letters are missing merged data or data is incorrect, you will need to navigate to the layout where that data exists for that particular record to correct it in the appropriate field or fields.

Letterbox Letters

Letterbox field is placed as a merge field in the body of the letter where you desire individualized text. It is also placed as a standard field at the bottom of the layout. In Browse mode, type text in the standard field at the bottom of the screen. When you tab out of the field, that text appears in the body of the letter where the merge field is placed. As with any merged field, the text in the Letterbox is specific to each record. Different text can be typed in different records, and some records can contain no Letterbox text at all. The standard Letterbox field is set to not print so it does not show in your print outs.

There are five Letterbox fields in SANDBOX. These fields are named Letterbox_0x with x being numbers 1 though 5. This enables you to have five different letters with associated Letterbox fields. You can always create more fields if you need in the future. The sample letter uses Letterbox_02 so that you are not able to use that field in another letter.

  1. From Inquiries click Letters in the top task bar. This navigates you to the Letters Org screen.
  2. Click the Letters Help button.
  3. Click on the Ex S Letterbox letter under Student.

  1. Switch to Layout mode.

Notice that the merge field <<Letterbox_02>> is inserted into the body of the letter directly below the first paragraph. In addition, that same field is placed at the bottom of the letter but formatted as a standard field and set to not print. (Refer to the article Working with Text, the section on Non-printing Objects for more details.)

 

Notice also that there is no blank line between the first paragraph and the Letterbox field. This is intentional so that paragraph spacing is correct, whether or not there is text in the field.

To see the power of this technique, switch back to Browse mode. In any record, click into the yellow Letterbox field at the bottom of the screen. Press return to insert a blank line and type some text. Tab out of the field (do not use Return, as this will add a blank line in your field). The text you typed will appear in the letter body where the merge field is placed.

Move to a new record. Notice that the new record does not contain the additional paragraph. Move to the next record and type something different from what you typed in the first record. Tab out and notice that the paragraph now appears in this record and this record only. Moreover, you have not lost the paragraph typed into the first record.

Using this sample letter as a template, follow steps 1-3 above for duplicating and renaming it and for connecting your new letter to the Letters Org screen.

Working with Letterboxes

Once you have successfully duplicated and renamed the Student Ex S Letterbox letter and connected your new letter to the Letters Org screen, you are now ready to edit the letter and insert a new Letterbox field.

  1. Using the Text tool, edit the merged Letterbox_02 field in the body of the letter. Type into the field name and change the _02 to _01. Remember not to delete the chevrons or the hyphen or add spaces. You may have to unlock the field Text Object first.  Recall that there are five Letterbox fields in SANDBOX. Letterbox_02 is used for the sample letter and cannot be used for any other letter.
  2. Double-click on the Letterbox_02 field at the bottom of the screen. You may have to unlock the field first. Because this field is formatted as a standard field, the Specify Field dialog box will appear, and a list of all the fields in the file will appear.
  3. Select Letterbox_01 from the list and click OK. The Letterbox_02 field will now be Letterbox_01. (The merged field and the placed field must be the same field—they are just formatted differently.)
  4. Double-click on the text label Letterbox_02. Change the 02 to 01 so that you know which Letterbox is being used on this layout.

  1. Edit the body of the letter, as needed, and insert and/or delete any other merge fields.
  2. Switch to Browse mode and try your letter.
  3. Switch to Preview mode to see that paragraph spacing is correct in records with the Letterbox text as well as those without.

Letter Parts

In FileMaker Pro, layouts are divided into Parts. When creating layouts, you decide what parts the layout will contain. All layouts need to have at least one part. Complicated layouts may have many parts. Some typical parts are HeaderFooter, and Body. You may want to refer to your FileMaker Pro User Guide for a complete discussion of parts and how to use them.

It is not necessary to use Header and Footer parts in letters. Instead, because you can place Text Objects anywhere on the letter, Text Objects near the top and/or bottom will replicate a word processing header and/or footer and appear in every record. For this reason, letters in SANDBOX contain only a Body part.

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Create a Ticket