Learn Goal 4 - Part 5: Display work orders for each customer

Document created by Kedar on Dec 10, 2014Last modified by communitymanager on May 12, 2015
Version 30Show Document
  • View in full screen mode



Now that the connection from customers to work orders has been made, let’s make use of this connection to display the work orders associated with a given customer.

 

 

Goal

Display each customer’s work orders on the “Work Orders” tab.

 

 

Steps

  1. Navigate to your Customer Detail layout.

  2. Choose the View menu > Layout Mode ⌘L or Ctrl-L

  3. Select the “Work Orders” tab.

    When you created your layout, you set it up to point at the Customers table occurrence because its primary purpose is to display Customer data. Think of this as your point of view.

    From the point of view of the Customers table occurrence, you also can see any other table occurrence connected to it by a relationship. In this case, that's the Work Orders table occurrence.

    As you've seen already, one way to show connected data is to use a portal, which gives a view into connected data, or what FileMaker Pro calls related records.

    Portals can give you a view of the data in any related table occurrence.

    In this section, you will add a portal that shows a list of all related Work Orders records.

    That is: all work orders that have the same "Customer No" as the Customers record currently being displayed.


  4. Select the Portal tool.
    portal tool.png

  5. Drag a large rectangle within the Work Orders tab, leaving some space at the top and bottom. pasted-image-2.png

    A Portal Setup dialog box appears.

  6. Click on the Show related records from drop down.

    The drop down includes the value “Work Orders” — the name of the table occurrence you connected to “Customers”.

    portal setup dialog.png

  7. Select the “Work Orders” table occurrence from the drop-down.

  8. Select the Show vertical scroll bar checkbox.

    This allows the salesperson to scroll through the work orders when there are more than the portal can display at once. Your portal probably can display six to eight rows, depending on how big you've made it. 

  9. Click the OK button in the lower right of the Portal Setup dialog box to save your changes.

    The Portal Setup dialog box disappears and a new Add Fields to Portal dialog box is displayed.

    We want to display the following fields in this order: Date, Description, and Hours.

  10. In the Available Fields list on the left, click the “Date” field.

  11. Click the Move button.

    The field appears in the Included Fields list on the right.

    If you click the wrong field and need to delete it, simply select it in the Included Fields and press the Clear button.

  12. Repeat steps 10 to 11 for the “Description” field.

  13. Repeat steps 10 to 11 for the "Hours" field.

    Make sure that the Included Fields order is Date, Description, and Hours.

    If you happened to get the fields in the wrong order, no problem. They have little handles on the left that allow you to drag them up and down to change the order.

  14. Click the OK button in the lower right of the Add Fields to Portal dialog box to save your changes.

    The Add Fields to Portal dialog box disappears, and the three fields appear in your new portal. pasted-image-4.png

  15. Choose the View menu > Show > Sample Data

    When the Sample Data option is selected, actual data is displayed instead of field names when you are in Layout mode. This helps you to evaluate how much space each field really needs.

  16. Inside the portal, change the widths and horizontal positions of the three fields so that they are sized appropriately to the data they contain.

    The “Description” field needs the most space. So make the “Date” field and “Hours” field as narrow as you can:

    pasted-image-6.png


  17. Choose the View menu > Show > Sample Data

    This deselects the Sample Data option, allowing you to see the field names again.

  18. Double-click the Date field.

    A Specify Field dialog box appears.


    Usually you’d use the Specify Field dialog box to choose a different field to display. But right now you just need a quick way to produce a label for the field.

  19. Select the Create label checkbox in the lower left of the dialog box.

  20. Click the OK button in the lower right of the dialog box.

    The Specify Field dialog box disappears and a “Date” label appears to the left of the Date field.

  21. Reposition the “Date” label above the Date field, paying attention to the blue guides to align things to your satisfaction.

  22. Repeat steps 18 to 21 for the “Description” and “Hours” fields to produce labels for them as well.

    The “Description” label may overlap the “Date” field, making it a little difficult to select.

  23. Select the Hours field.

  24. In the Inspector, choose the Appearance tab.
    inspector appearance tab 2.png

  25. In the Paragraph area, select the right-alignment option.
    inspector paragraph align right.png


    Next you'll standardize the Hours field to have two decimal places.

  26. In the Inspector, choose the Data tab.
    inspector data tab for hours.png

  27. In the Data Formatting area, choose “Decimal” from the Format drop-down menu.
    inspector data formatting decimal.png

    This causes new options to be displayed in this area.

  28. Select the checkbox for Fixed number of decimals.

    Leave the standard number of “2” in place.   

    fixed number of decimals.png

  29. Choose the View menu > Browse Mode  ⌘B or Ctrl-B

  30. Select the “Work Orders” tab.

    See how the list of work orders in the portal changes as you navigate from one customer record to another. The work orders for each customer are displayed.


    Also notice how the formatting applied to the Hours field makes that data easier to compare between rows.

    Looking good!

 


     

      

Attachments

    Outcomes