filemaker pro 11 the missing manual phần 8 pps

91 303 0
filemaker pro 11 the missing manual phần 8 pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

613  :    Web Viewer Objects FREQUENTLY ASKED QUESTION FileMaker’s Web Browser Is the web viewer a modern browser? Is it standards- compliant? Can it run JavaScript, or use browser plug-ins? Should I be worried about compatibility with various pages? FileMaker doesn’t actually have a web browser of its own lurking underneath your layout. Instead, it calls upon the services of the web browser engine most readily avail- able—the one that came with your computer. In Windows, FileMaker uses Internet Explorer as its underlying browser technology. In Mac OS X, it uses Safari instead. This ar- rangement has a few important implications: • FileMaker is using a tried-and-true browser technol- ogy, so you know it works well with most web pages. It has support for all the major web technologies, just like its real web browser counterparts. • If you install any plug-ins for your web browser, File- Maker web viewers can utilize them as well. • If you upgrade your operating system or web brows- er, FileMaker’s web viewer gets the benefits of the upgrade as well. For example, if you install Internet Explorer 7 (or use Windows 7), then the web viewer gets all its page-handling capabilities. If you have In- ternet Explorer 6 installed instead, your web viewer has its limitations. Instead, simply ask FileMaker to go get the maps from the Internet for you. Using a FileMaker web viewer, you can get FileMaker to automatically and instantly fetch almost anything available on the Web and display it directly on the layout. FileMaker even takes care of keeping things up to date: Every time you visit a record on the layout, it checks to see if newer information is available, and automatically fetches the most up-to-date version, just like your web browser. You create web viewers with the web viewer tool. This globe-decorated tool button lives on the Status toolbar near the field tool. It works like most FileMaker tools: First, in the Status toolbar, click the globe button, and then, on the layout, drag a rectangle to tell FileMaker where to put the web viewer, and how big to make it. Putting a Web Viewer on a Layout Your People database could use a map on the People Detail layout. Here’s how to put one there. 1. Switch to the People Detail layout, and then (if necessary) switch to Layout mode. Since a map can be large, it makes sense to put it on the Detail layout, where you have some room to work with. 2. Make the Body part much taller by dragging its label downward. The idea is to make room for the web viewer on this otherwise crowded layout. 614 FM P : T M M Web Viewer Objects 3. In the Status toolbar, select the Web Viewer tool, and then draw a rectangle on the page roughly the same width as the Notes field and a few inches tall. As usual, you’re free to tweak the exact size and position of the web viewer any time you want, so you don’t have to be perfect here. As soon as you let go of the mouse button, FileMaker shows you the Web Viewer Setup dialog box (Figure 14-9). Figure 14-9: The Web Viewer Setup dialog box has a lot of options. First, from the list on the left, pick the website you want to show. Then fill in the appropriate boxes on the right. If you choose Custom Web Ad- dress, then, at the bottom of the window, you can use the Web Address box to type any URL you want. 4. In the “Choose a Website” list, select Google Maps (US). You’re telling FileMaker you want this web viewer to show information from the Google Maps website. As soon as you make this selection, several entry boxes appear on the dialog box’s right side. 5. To the right of the Address entry box, click the square button, and then, from the resulting pop-up menu, choose Specify Field. FileMaker pops up the standard Specify Field dialog box. Here you tell File- Maker which field to pull the street address from when it goes to find a map. 615  :    Web Viewer Objects 6. In the Specify Field window, select Street Address, and then click OK. FileMaker now knows the first piece of information it needs to find the ap- propriate map. Notice that the Address box now shows People::Street Address. 7. Repeat step 7 for the City, State, and Zip Code boxes. In each case, pick the appropriate field. As you make selections, FileMaker fills in the various boxes. The Web Address box at the bottom of the window also changes, but you don’t need to concern yourself with that just yet. 8. Click OK. The Web Viewer Setup window disappears, and the web viewer appears on the layout. 9. Select the web viewer, and then anchor it to the left, bottom, and right (but not the top) using the Inspector. To keep the web viewer from bumping into the expanding Notes field when the window is resized, you need to tell it to stick to the bottom of the window. If you switch to Browse mode, and your computer is connected to the Internet, then you should see the Google Maps page with a map for the current person record (Figure 14-10). You may need to make the window bigger for the map to display properly. If you fiddle with the database a bit, then you notice a few important things: • When you switch to a new record, the web viewer changes its contents to reflect the address information on the new record. Likewise, if you change the data in any of the address fields, then the map instantly updates to show the new address. • Status information shows at the bottom of the web viewer while the page loads. • You’re free to click links in the web page, and the web viewer dutifully follows your clicks and shows a new page. • Although the web viewer isn’t a full-fledged browser (it doesn’t have a Back button, for instance) you can access most typical browsing commands by right- clicking (Windows) or Control-clicking (Mac) anywhere on the web page. In fact, the menu that appears when you do is just like the one you’d see if you did the same in your real web browser. For instance, choose Back from this menu to go to the previous page. Web Viewer Options FileMaker offers up a few configuration options for web viewers in addition to the page they should load. The bottom of the Web Viewer Setup dialog box (Figure 14-9) includes four checkboxes to adjust the behavior of this particular web viewer. 616 FM P : T M M Web Viewer Objects Figure 14-10: The People database now has a Google Maps web page showing right on the detail layout. File- Maker’s web viewer lets you embed any web page on the layout, so you can save countless trips to your favorite web resources. Unfortu- nately, web pages tend to be big. You’ll learn how to give this map more breath- ing room without investing in a 30-inch screen on page 618. Allow interaction with web viewer content When the “Allow interaction with web viewer content” option is turned on (as it is for your map), FileMaker lets you actually use the web page it loads. Specifically, you can click a link on the page to navigate to a new page. You can also use shopping carts, send email messages, watch video, or use any other features on the page. When you turn this option off, all page behavior is deactivated. Clicking the page produces no more response than clicking a blank spot on the layout. You can’t even scroll the page. If a page is too big to fit in the space you’ve given it on the layout, then FileMaker simply cuts it off. 617  :    Web Viewer Objects Turn this option on when the page you’re showing is just a starting point (like the login screen for your Orders web page, or the first step in the application process). You should also leave this option on when the page is larger or its size is variable. On the other hand, you can turn “Allow interaction with web viewer content” off when you’re showing a small page that contains all the information needed. POWER USERS’ CLINIC Beyond the Built-in Sites When you added a Google Maps page to your layout, you didn’t have to figure out how Google expects to receive address information. Instead, you simply picked Google Maps from a list, and then filled in the blanks. This easy-to- integrate approach is possible because FileMaker already knows how to connect to Google Maps. FileMaker has built-in support for several popular websites (you see each one listed in the Web Viewer Setup dialog box). When you pick from this list, FileMaker shows a series of entry boxes appropriate for that site. For example, with Google Maps selected, the dialog box asks for Address, City, State, Zip Code, and Country. If you pick FedEx instead, FileMaker asks for a Tracking Number. In every case, you can pick a field FileMaker should use to get the data it wants, or you can type a value instead, like USA for Country if all your addresses are in the United States. But don’t let FileMaker’s list of companion sites trick you into thinking they’re the only ones that work. You can con- nect a web viewer to any site. At the top of the “Choose a Website” list, just choose Custom Web Address. Then, in the Web Address box at the bottom of the window, type any URL you want (or copy one from a web page, and then paste it in). Unfortunately, if you want the exact page information tied to data in the record (just like the Google Maps example), then you have to supply a calculation for the Web Address. Chapters 8, 9, and 15 have everything you need to master calculations. Display content in Find mode Normally, when you switch to Find mode, the web viewer just goes blank. Which makes sense, since a web viewer is usually showing a page associated with data in the current record. After all, if you go to Find mode, where you’re no longer necessarily looking at a particular record, then FileMaker may not be able to tell which web ad- dress goes in the web viewer. You can change this behavior, though, by turning on “Display content in Find mode”. When you do, FileMaker makes its best effort to display the web page even when you’re in Find mode. For example, if you’ve typed a URL directly into the Web Viewer Setup dialog box, then FileMaker can continue to display the page properly no mat- ter which mode you use (except Layout mode). If you’re using a website that needs information from the database, then FileMaker feeds it the data from the find re- quest instead. This behavior could come in handy if the web page information would be helpful to a person trying to construct a find request, but usually you want to leave this option off. It can be jarring to watch a web viewer constantly refresh itself as you enter your find criteria. 618 FM P : T M M Conditional Formatting Display progress bar Unlike everything else on your layout, web page content isn’t always immediately accessible by FileMaker. The program has to go to the Internet and pull up the page, which can take some time (just as it takes time for a page to load in your browser). If you turn on “Display progress bar” (it’s on until you turn it off, in fact), then File- Maker shows a subtle progress bar at the bottom of the web viewer (Figure 14-11). Display status messages Another option that FileMaker automatically turns on is the “Display status mes- sages” checkbox. This option tells the web viewer to reserve a little space along its bottom edge to show status information (Figure 14-11). Status information typically means the “Loading…” messages you see at the bottom of a web browser window. Turn this option off if you’d rather not sacrifice precious layout space for not much more information than what the progress bar already gives you. That way, the web viewer can use all its space on the layout for web page content. Conditional Formatting Sometimes you want the formatting (color, font, style, and so forth) of a layout ob- ject to change depending on certain criteria. For example, you might want the Status field to change color depending on its value, turning red if the person is deceased. That way you easily spot this fact whenever you look at the record. FileMaker’s conditional formatting feature lets you make database objects change when, well, conditions change. It works by letting you specify a series of criteria and the specific formatting changes that go along with them. FileMaker means condition in the “I’ll give you a hand on one condition…” sense. As long as certain restrictions are met, the formatting applies. Conditional Formatting of Fields You can apply conditional formatting to any text object, button, field, or web viewer. Follow these steps to make your status field more dynamic: 1. On the List layout, select the Status field, and then choose Format➝Conditional. You see the Conditional Formatting dialog box pictured in Figure 14-12. 2. Click Add. A new condition appears in the list at the top of the window. Also, the dialog box’s Condition and Format sections become active (they were grayed out until now). 3. From the first pop-up menu under Condition, make sure “Value is” is chosen. You can configure your condition in two different ways. Either you place simple rules on the value of a field, or, if your needs are more complex, you use a for- mula. You’ll start with the easy kind. 619  :    Conditional Formatting Figure 14-11: If you turn on the right options, the web viewer can show a status message (that text at the very bot- tom) and/or progress bar (the black line just above the status bar) as the web page loads. If you prefer a minimalist look, in the Web Viewer Setup dialog box, turn off both “Display status message” and “Dis- play progress bar”. Figure 14-12: The Conditional Formatting dialog box lets you assign formatting to a field, button, or text object that kicks in only when certain condi- tions are met. Simply click Add to add a new condition. Use the pop-up menus and boxes below the Condition line to tell FileMaker under what conditions the format- ting should apply, and tell it what formatting you want by tweaking the options under Format. 620 FM P : T M M Conditional Formatting 4. From the second pop-up menu under Condition, choose “equal to”. In this case, you want the conditional formatting to apply when the Status is “Deceased”, so you tell FileMaker that’s the kind of comparison it should do. 5. To the right of the pop-up menu, in the box, type Deceased. Here’s where you enter the comparison value. (If you choose a comparison type other than “equal to”, then the dialog box may show you different options.) FileMaker adjusts the display of the dialog box so that the condition line reads like a meaningful sentence: “Value is➝equal to➝Deceased.” 6. From the Fill Color pop-up menu, choose a dark red color. Then from the Text Color pop-up menu, choose white. As soon as you make a selection from either pop-up menu, FileMaker turns on the checkbox to the left of its label. This checkbox tells FileMaker you want it to go ahead and apply this style when the condition is met. If you decide you don’t want to change the fill color after all, you can simply uncheck the box. Note: You don’t have to provide any formatting rules for other values in the Status field. When none of the conditions in the Conditional Formatting dialog box apply (you can add as many as you want), FileMaker leaves the object formatted as it is in Layout mode, so you don’t need to add a condition for the normal case. 7. Click OK. The Conditional Formatting dialog box disappears, and your field now sports a Conditional Formatting badge. That little red and blue diamond on the right side of the field lets you know Conditional Formatting is used on this field. Although the layout looks unchanged, if you switch to Browse mode, then you see it works as advertised. Every person with a status of Deceased shows in red. Conditional Formatting of Text Objects You can apply conditional formatting to many kinds of layout objects—fields, text objects, buttons, and web viewers, some of which you’ll learn about later in this chapter. But typically when you format something other than a field, you need to use a formula for the condition, since those objects don’t have values that change. Note: Text objects are the exception. You can use conditional formatting rules on text objects, and they apply based on the text you type into the object. However, conditional formatting of text objects is most useful when they contain symbols (page 162) or merge fields. You can set up the text object’s appearance to change when its contents change. 621  :    Conditional Formatting To show a formula-based conditional formatting rule, you’ll add conditional format- ting to your database in a surprising place. Take a peek at Figure 14-13 to see the problem you need to fix. Figure 14-13: Take a look at the text under Robert Johnson. You see two extraneous commas floating in the middle of nowhere. These commas separate the address, city, and state in the address line. In this case, all the address fields are empty, so just the commas show up. Most people wouldn’t think of it right away, but conditional formatting can help clean up a little mess like commas between empty fields. If the address fields are empty—and that’s a condition—you don’t want the commas to show up. FileMaker doesn’t have the power to make layout objects disappear completely, but you can turn the text white. Then, even though the commas are technically there, no one can see them. Since the formatting is applied conditionally, as soon as address informa- tion is entered for a record, the data (commas and all) appears normally. Tip: You have other ways to solve this same problem. For example, you can add a calculation field (page 131) to your database that intelligently assembles the address info into a compact line. Using conditional formatting, you’ll make the text color turn white when the address fields are empty. This tactic requires a relatively simple formula. Here are the steps: 1. Select the text object containing the address merge fields, and then choose Format➝Conditional. The Conditional Formatting dialog box reappears. 622 FM P : T M M Conditional Formatting 2. Click Add to add a new condition to the list. Once again, a line appears in the list at the top of the window. 3. Switch the first pop-up menu to “Formula is”. The remaining pop-up menu disappears, and a new larger box appears in its place, where you’ll type your formula. 4. In the formula box, type the following: IsEmpty(People::Street Address) and IsEmpty(People::City) and IsEmpty(People::State) and IsEmpty(People::Zip Code) It’s important to type the formula exactly, since typos may prevent the whole thing from working. This formula checks to see that all the address fields are empty. (Everything you need to know about formulas is in Chapter 8.) 5. From the Text Color pop-up menu, choose the white tile, and then click OK. The Conditional Formatting dialog box goes away. Tip: If you get an error message, clear the formula box, and then try typing over the formula again. Now if you switch to Browse mode, you see that the mysterious commas have disap- peared. See Figure 14-14 for proof. This technique of hiding things is surprisingly common among more advanced FileMaker developers because it helps build more data-rich layouts with less clutter. Advanced Conditional Formatting In both of the previous examples, you added only one condition to the list in the Conditional Formatting dialog box. But it isn’t a list if you can’t add more than one. When you do, FileMaker looks at every condition on the list, and makes the format- ting changes for each one that applies. As a result, you can easily create several dif- ferent formats for several different conditions. For example, you can make numbers in your budget database turn red when you’re getting behind, stay black when you’re right on target, and turn green when you’re beating expectations. Two matching conditions can even have competing formatting rules. For instance, you can set the text color to something different in each rule, even though they both apply to the same values. In that case, FileMaker chooses the format from the condition that comes last in the list. You can move these conditions around using their little arrows to influence its decision. Just put the condition that should take precedence lower in the list. Also, in the Conditional Formatting dialog box, if you don’t see the formatting choice you want, just click More Formatting, and chances are you’ll find what you want. This button opens a dialog box that lets you adjust additional formatting, in- cluding font, size, and a few extra styles. [...]... rearrange the names on the left to be in alphabetical order, the numbers on the right wouldn’t automatically change with them 1 Choose View➝Layout Mode, and then select the Chart tool from the Status toolbar It’s the button that looks like a tiny bar chart 2 Below the fields on the layout, drag out a box roughly the combined width of the fields already on the layout and down to about the bottom of the Body... select the Chart tool It’s the button that looks like a tiny bar chart 6 38 FileMaker Pro 11: The Missing Manual Advanced Charting 3 Below the fields on the layout, drag out a box about as tall as the available space in the Body part, and roughly as wide The Chart Setup dialog box appears (Figure 14-29) 4 Change the Use Data From value to Related Records A new Related Table pop-up menu appears 5 From the. .. numbers, the lowest value in the set The high should be just slightly higher than the largest number in your data If your data is subject to a lot of variability, just leave this option unchecked FileMaker does a pretty good job of setting the range automatically 6 28 FileMaker Pro 11: The Missing Manual Chart Formatting Figure 14-20:  With X axis labels turned 45º, the columns are now clearly identified The. .. “False” when there’s data in the field 644 FileMaker Pro 11: The Missing Manual Understanding Boolean Functions Figure 15-1:  The Specify Calculation window appears when you select "Empty" from the second pop-up menu and then change "Value is" to "Formula is" in the condition pop-up menu The calculation engine converts the handy pop-up menu choices into calc-speak Here you’ll see heavy use of the Self... for the three exhibits in the current found set 634 FileMaker Pro 11: The Missing Manual Advanced Charting Advanced Charting So far, you’ve been charting data from multiple records in a single table, but FileMaker offers two other data sources for visualizing—Delimited data and Related records You can select either from the Chart Setup dialog box (Figure 14-25) To see them, enter Layout mode, and then... friendly 16 In the Chart Setup dialog box, click Format Chart The Format Chart dialog box opens 17 From the list of choices on the left, choose Horizontal (X) Axis, and then set Label Angle to “45º” This option prevents the labels that run along the bottom of the chart from overlapping one another 18 Back in the list of choices on the left, choose “(Y) Series 1”, and then type Unique Visitors for the Series... translate to the other parts 632 FileMaker Pro 11: The Missing Manual Charting and Reports Picking the Right Fields Picking the right fields might, on its face, seem to be a pointless rule After all, you know which fields contain the information you want charted, right? And FileMaker won’t let you make an invalid chart, so what’s the problem? The problem is that no product can prevent you from creating... and then click OK chapter 14: reporting and analysis 639 Advanced Charting 11 Click the square button to the right of the Vertical (Y) Axis field, and then select Specify Field Name In the Specify Field dialog box that appears, make sure the pop-up menu is set to Attendance 12 From the field list, select Reentry Count from the list, and then click OK 13 Just below the Vertical (Y) Axis box, click the. .. name, FileMaker sees that it needs to recalculate Full Name, which in turn triggers a recalculation of the Full Address value The recalculation trickles down through all the dependent fields as soon as someone makes the change, and then exits the First Name field 6 48 FileMaker Pro 11: The Missing Manual ... records you want charted 8 Set the pop-up menu to the first choice: Current Layout (“Related Data”) Click Facility Name, and then click OK You’re back in the Chart Setup dialog box 9 Click the square button to the right of the Horizontal (X) Axis field, and then select Specify Field Name In the Specify Field dialog box that appears, make sure the pop-up menu is set to Attendance 10 From the field list, select . series’ (see the steps on page 6 38) , FileMaker will group and color them together. Horizontal Bar Distinguished by their lateral proclivities, Horizontal Bar charts are the same as the implicitly. 7 for the City, State, and Zip Code boxes. In each case, pick the appropriate field. As you make selections, FileMaker fills in the various boxes. The Web Address box at the bottom of the window. yet. 8. Click OK. The Web Viewer Setup window disappears, and the web viewer appears on the layout. 9. Select the web viewer, and then anchor it to the left, bottom, and right (but not the top)

Ngày đăng: 14/08/2014, 08:21

Từ khóa liên quan

Mục lục

  • Part Four: Becoming a Power Developer

    • Chapter 15. Advanced Calculations

    • Chapter 16. Advanced Scripting

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan