Chapter 4. Creating the Global Settings Layout

The Global Settings layout serves two functions. First, it’s where you’ll enter all the constants that will be used in calculations. When we defined these fields in Chapter 2, we made them global—meaning that they were intended to store a single value for the database, rather than a different value for each record. You’ll use these fields to record the IRS mileage rate for the current year (Mileage Rate), current year (Year), length of your default trip (Mileage Increment), and odometer readings at the start and end of the year (Start Mileage and End Mileage).

Second, a variety of calculations are performed on this layout. You can switch to this layout whenever you want to check the business miles driven to-date (MilesSum), as well as their dollar value (Annual Dollar). When you enter your year-end odometer reading, you’ll be able to see the total miles driven for the year (Annual Miles), the split between personal and business miles (Personal Miles and MilesSum), and the dollar value of the business miles (Annual Dollar).

Creating the Global Settings Layout

Duplicate a Layout

You don’t have to use the New Layout/Report wizard to create every layout. Because the Global Settings layout will use many of the same design elements as the Data Entry layout, we’ll create this layout by duplicating the Data Entry layout and then making the necessary changes.

Duplicate a Layout Switch to Layout mode (View > Layout Mode).

Duplicate a Layout Ensure that the Data Entry layout is displayed. If it isn’t, choose its name from the layouts menu at the top of the status area.

Duplicate a Layout

Duplicate a Layout Choose Layouts > Duplicate Layout. A duplicate is created named Data Entry Copy and becomes the active layout.

Duplicate a Layout To rename the layout, choose Layouts > Layout Setup.

Duplicate a Layout Type Global Settings in the Layout Name text box, remove the check mark from include in layouts menu, and click OK.

Duplicate a Layout

Edit the Background

We’ll make both of these layouts the same size. Doing so will make switching between them less visually jarring. Because the Data Entry layout will eventually contain buttons at its top (currently represented by blank space), we’ll need to enlarge some of the background graphics on the Global Settings layout.

Edit the Background Switch to Layout mode and make the Global Settings layout active.

Edit the Background Select the Business Mileage text and press Edit the Background/Edit the Background to delete it.

Edit the Background To enlarge the title block, select it, hold down Edit the Background, and drag one of the top handles upward until you reach the top of the layout. To change the block’s width, select one of the handles on its left side, hold down Edit the Background, and drag to the right (width: 2.972 inches).

Edit the Background

Edit the Background Now select both the Travel Date text and its blue bar by holding down Edit the Background as you click them, and then drag them to the top of the screen. When they’re in position, click a blank area of the background to deselect the two items.

Edit the Background Select only the bar (without its text). To widen it, Edit the Background-drag a right handle. Stop dragging just before it reaches the title block (width = 3.181 inches).

Edit the Background

Edit the Background We’ll resize the purple block next. Select the block and drag its upper-right handle until it’s the size shown here. (Note that the block’s top edge meets the bottom edge of the bar.)

Edit the Background

Edit the Background Now we can edit the text in the two bars. Double-click the text in the top bar. (Doing so switches to the Text Tool.) Drag-select the text and type: Mileage Constants. Then insert the word Annual in front of the Mileage text in the middle bar.

Edit the Background

Edit the Background The layout stills needs a title. Choose a font from the Text Formatting toolbar (such as Verdana 18 pt. white), select the Text Tool, click in the title block to set the insertion point, and type Global Settings.

When you’re done, click outside the title text. The text is surrounded by handles. Drag the text to approximately this position in the title block.

Edit the Background

Replace the Fields

Although we won’t be using any of the duplicated fields, it’s simple to substitute the correct fields for ones already on the layout.

Replace the Fields While any field can be replaced with another using the procedure that follows, field labels can’t be replaced. Replace the Fields-click all field labels on the layout and then press Replace the Fields/Replace the Fields to delete them.

Replace the Fields Double-click the Date field. In the Specify Field dialog box, select the Mileage Rate field, click the Create field label check box, and click OK.

Replace the Fields

The Mileage Rate field replaces the Date field on the layout. The formatting originally applied to the Date field is retained.

Replace the Fields

Replace the Fields Using the same technique, replace Start Mileage with Year, End Mileage with Mileage Increment, Total Mileage with Start Yr, Mileage Amount with End Yr, Destination with Annual Miles, and Business Purpose with Personal Miles. Be sure to click the Create field label check box for each one.

Replace the Fields Two more fields need to be added to the layout: MilesSum and Annual Dollar. To match the formatting of the other fields on the layout, the simplest way is to duplicate existing fields. Select the Personal Miles field on the layout, and choose Edit > Duplicate. In the Specify Field dialog box, select the MilesSum field, ensure that Create field label is checked, and click OK. On the layout, select the MilesSum field and its label, and drag them beneath the Personal Miles field.

Replace the Fields Repeat Step 4 to duplicate a field (any field in the second column will do), but this time select Annual Dollar in the Specify Field dialog box. Drag the Annual Dollar field and its field label beneath the MilesSum field.

Replace the Fields

The layout should now look something like this. Don’t worry about the exact placement and spacing of fields. We’ll rearrange them shortly.

Set Formatting

To complete the layout, we need to reformat the labels; edit the label text; set the size, alignment, and formatting for the fields; and move the label/field pairs to the proper spots. The table below shows many of the important format settings for the fields and labels.

Set Formatting Select all field labels and set these options on the Text Formatting toolbar: Verdana, 10 pt. (Mac), 9 pt. (PC), not bold, black, right-aligned. (We want to duplicate the label formatting from the Data Entry layout. If you chose a different font or size for that layout, use the same formatting here, too.)

Set Formatting One by one, select the Mileage Rate, Year, and Mileage Increment field. Set each one’s width to 0.681 inches. Then select each remaining field on the layout, and set its width to 1.014 inches.

Field Name

Field Label

Number Formatting Options

Mileage Rate

IRS Mileage Rate

Format as decimal, 4 decimal digits; Use notation: Currency (leading/inside), $ symbol; no thousands separator

Year

Year

Format as decimal, 0 decimal digits; no thousands separator

Mileage Increment

Mileage Increment

Format as decimal, 0 decimal digits; no thousands separator

Start Yr

Odometer at Year Start

Format as decimal, 0 decimal digits; thousands separator:, (comma)

End Yr

Odometer at Year End

Format as decimal, 0 decimal digits; thousands separator:, (comma)

Annual Miles

Annual Miles Driven

Format as decimal, 0 decimal digits; thousands separator:, (comma)

Personal Miles

Personal Miles

Format as decimal, 0 decimal digits; thousands separator:, (comma)

MilesSum

Business Miles

Format as decimal, 0 decimal digits; thousands separator:, (comma)

Annual Dollar

Amount To-Date

Format as decimal, 2 decimal digits; Use notation: Currency (leading/inside), $ symbol; thousands separator:, (comma)

Set Formatting Select all fields and set their paragraph alignment to right-aligned.

Set Formatting All fields on this layout will store numbers. Select each field, choose Format > Number, and set the number formatting options listed in the table.

Set Formatting Using the Text Tool, edit the field labels as indicated in the table.

Set Formatting

Sanity check: Your layout should now look similar to this. Because of their length, some labels automatically shifted right in order to remain on the layout. Don’t worry; we’ll fix them in the next section.

Arrange the Fields

Now it’s time to move the fields and their labels into the proper positions.

Arrange the Fields Select the four fields and matching labels on the right side of the layout, and Arrange the Fields-drag them to the right edge. (They won’t remain there, but we’ll need to get them out of the way to give us room to work.)

Arrange the Fields Select the same four field’s labels (as shown here) by Arrange the Fields-clicking them. Press Arrange the Fields five times to move the labels closer to their fields.

Arrange the Fields

Arrange the Fields Arrange the Fields-drag the five fields on the left side of the layout slightly to the right, away from their field labels.

Arrange the Fields After you edited the five field’s labels, their right edges were no longer aligned with one another. Select these five field labels and choose Arrange > Set Alignment. In the Set Alignment dialog box, choose None and Align right edges. Then click OK.

Arrange the Fields

Arrange the Fields The Mileage Constants block (top left) will hold three fields: Mileage Rate, Year, and Mileage Increment. Arrange these fields and labels in a single column. Move the labels so they’re closer to their fields, as was done for the previous fields.

If you increase the zoom level, you’ll find it easier to create the same spacing between fields, as well as center them vertically within the block. Use the arrow keys to nudge them into position, if necessary.

Arrange the Fields

Arrange the Fields The remaining fields should be arranged in the Annual Mileage block as shown below. (In both columns of three, the right edges of the labels are aligned and the top of each field is aligned with the top of the field in the other column. Use the Size palette to check positions.)

Arrange the Fields

Arrange the Fields At present, there’s space between the Body tab and the bottom bar. Eliminate the space by dragging the Body tab up to the bottom edge of the lower bar (as shwn above).

Arrange the Fields To finalize the layout, choose View > Browse Mode. When prompted to save your changes, click Save. (This dialog box is a new feature in FileMaker Pro 7. If you have an earlier version, the Save changes dialog box won’t appear. Instead, all layout changes are saved automatically.)

Arrange the Fields

As is the case with the Data Entry layout, the Global Settings layout isn’t completely finished. In Chapter 8, we’ll add a button that—when clicked—takes you to the Data Entry layout.

Extra Bits

  • Another way to add a field is to click the Insert Field tool and drag the new field onto the layout.

  • When moving a field and its label, you may want to group the two items to avoid accidentally losing the original alignment and spacing between them. Select the field and label, and choose Arrange > Group.

  • On a PC, FileMaker Pro initially lists only a handful of fonts in the Format > Font submenu. To add other fonts, choose Format > Font > Configure/More Fonts.

  • You can open the Number Format dialog box by Set Formatting p. 53/right-clicking a Number field and choosing Number Format from the menu that pops up.

  • When applying formatting to Number fields, you can speed up the process by applying it to several fields at once. For example, Year and Mileage Increment share the same Number formatting, so it can be applied to both of them simultaneously.

  • You can also resize several fields simultaneously by typing values into the Size palette. However, they must initially all be the same size.

  • After using the Set Alignment dialog box, you can apply the same alignment settings to a new group of selected items by choosing Arrange > Align. Until you specify new settings in the Set Alignment dialog box, the current ones are remembered.

  • You can also use the Set Alignment dialog box to distribute a group of items (spacing them equidistant from one another). For example, on this layout, group each field and label pair in a column. Move the uppermost and the lowermost fields to their intended spots on the layout. Then select all fields in the column and choose Arrange > Set Alignment. Select Distribute Space in the Top to Bottom section and None in the Left to Right section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.4.176