Building layouts Flashcards
The phrase “Context is king” is at the core of FileMaker. How does this idea affect FileMaker actions such as scripting, data entry, and layout creation?
In FileMaker, context refers to the underlying table occurrence of a layout, the current found set and the current record. Almost every action in FileMaker operates from the current context, so if the context is incorrect, you are likely to get unexpected results. For example, consider a script intended to delete a Student record. The Delete Record/Request script step will simply delete the currently active record, so if the script were to run while the current context was a teacher or class record, a record in the wrong table would be deleted. You can change or check the current context using a variety of script steps, including Go to Layout and Go to Related Record.
A custom app has three tables: Companies, Employees, and Contact Methods.
The employee John Smith has three records in the ContactMethods table for cell phone, work email, and personal email, entered in that order (in the ContactInfo field). If a portal to Employees is placed on the Companies layout, and the field ContactMethods::ContactInfo is placed in the portal, what would you see in that field for John Smith? How would you change the portal on the Companies layout to be able to view all ContactMethods records for each employee?
In this scenario, you would only see the first related ContactMethod for each related contact. For John Smith, it would show only cell phone. To view all of ContactInfo records, the portal’s context would need to be changed to ContactMethods. This action would result in all three of John Smith’s ContactMethods records being visible in the portal and all ContactMethods for all other company employees.
What are the three options for the data source of a chart object? Explain how each differs in terms of the way the data is gathered.
A chart’s data can be gathered in the following three ways:
a. Current Found Set – data sets contain one element from each record (or subgroup, like a subsummary report) in the found set.
b. Current Record (delimited data) – data set provided by return-delimited lists. These can be built or gathered using text functions or fields that contain return-delimited values.
c. Related Records – data sets contain one element for each record (or subgroup) in a set of records related to the current record.
What object attributes can be modified in the Objects tab?
Using the Objects tab, you can modify an object’s name, conditional formatting (if applicable), script triggers (if applicable), and stacking order.
A developer uses the Objects tab to hide an object so she can work with other objects on the layout. What circumstances will cause the object to become visible again?
An object hidden with the Objects tab will always be visible in Browse mode. It will also be visible in Layout mode if the file is closed and reopened.
A field has a themed style called “Edit_Left” that is set to be left-aligned with 12pt gray text. What are two ways that this style can be overridden?
A field’s themed style can be overridden by local formatting or by conditional formatting.
A FileMaker file has a custom style for a field called “Label_Right”, which is styled as right-aligned, 10pt, and red. The developer wants to use this style on another layout, so he copies the object’s style using the Copy the object’s style button and selects another field on another layout. He uses the Paste a style button. What happens?
When copying a style from one layout to another, the style is not copied. The attributes are copied and
applied as local formatting.
A phone number field on a layout needs to have a script trigger on it that checks to see if the field contains an entire phone number in the proper format. If the user enters “2123” in that field, how can you set up the script to prevent the user from leaving the field and saving the data?
To prevent the user from saving a phone number with an incorrect format, you would set an OnObjectSave trigger for the field. The associated script would check to see if the value in the field is correct in terms of format and length. If not, then the script would have an Exit Script [False] step, thereby canceling the event and not allowing the value to be saved.
List the order in which these object script triggers run: OnObjectModify, OnObjectEnter, OnObjectValidate, OnObjectExit, OnObjectSave.
The order is:
a. OnObjectEnter
b. OnObjectModify
c. OnObjectValidate
d. OnObjectSave
e. OnObjectExit
On a report layout, a chart summarizing groups of records is placed in the top navigation part. What data will be displayed on the chart for the current found set?
When a chart set up to chart the “Current Found Set” is placed on a top navigation part, you will see data from the first record of each outermost group of the sorted records.