Linking To Contacts & Projects in FileMaker

DayBack includes sample tables that represent Contacts and Projects, which you can link to the tables you already have in your solution. If your calendar events are related to Contacts or Projects, you can display those relationships in DayBack and easily navigate to those related entities from the calendar.

Note: These tables don’t have to be used strictly for "contacts" and "projects" but can represent any two parent entities associated with an event.

Setting Up Contacts & Projects

Start by linking the contact and project occurrences in DayBack to the appropriate tables in your solution. 

  1. Point to the Correct Table Occurrence
  • Double click on the SampleContacts_DayBack table occurrence in the calendar's relationship graph and point it to your contacts table.
  • Adjust the relationship with SampleEvents_DayBack so it's using the primary key of your contacts table on the contact's side of the relationship. Do the same for projects.
  1. Ensure to use Single-Key Relationships:
  • Ensure that the relationship is a single-key relationship, not a multi-key one. It must relate to a single field, similar to what is shown above.
  • If you need to rely on multiple values, create a new field in your contacts and projects tables that concatenates these values into a single string. Make sure this field is not set to unstored and ensure it is indexed for better performance.
  • Once this is done, you can use the FileMaker replace command to backfill calculated data into existing records if necessary.
  • Finally to complete the other side of the relationship, in your events table, create a similar field that concatenates the necessary values into a single string. Then, create new table occurrences for projects and contacts and utilize the newly created fields for the join in the relationship.
  1. Managing Multiple Relationships:
  • DayBack can only display fields from one related table at a time. If multiple tables are related to the same key field in your event table, DayBack may not show the expected table.
  • To avoid this, it's usually best to create a new Table Occurrence for your events that is solely used by DayBack, ensuring only one relationship connects to your Contact and Project key fields.
  1. Handling Multiple Files:
  • If your events table is in a different file from DayBack, make sure the table occurrences have the same names in both files. This is crucial because these names will be evaluated in the context of the file where your events live.

Once you've correctly set up the relationship graph to point to the desired entities, open DayBack's admin settings and select the calendar you wish to customize. For this example, we'll use the Sample Events calendar.

Field Mapping

Navigate to the Field Mapping Tab:

  • Scroll down to find the Contact and Project fields, located just above the "Validate your field mapping" section.
  • Click on the "Details" link under each field to review the required information.

Update Field Mapping:

  • If you initially used DayBack with the example contacts and projects tables, these fields might still be pointing there. Update the ID fields in your events table and the "name" fields from your contacts and projects tables accordingly.
  • Once all necessary updates are made, click "Validate Field Mapping" at the bottom of the screen to confirm your changes.

Related Records

Access the Related Records Tab:

  • The Field Mapping section tells DayBack how to display your related contacts and projects. In the Related Records tab, you’ll configure how DayBack searches for and navigates to those related records.
  • Click on the "Details" link under each field to understand what’s required.

Validate Your Settings:

  • After making the necessary adjustments, click "Validate..." for contacts or projects to ensure everything is correctly set up.

Example Layouts and Scripts

Update Layouts:

  • If you’ve changed the tables that your related contacts and projects are based on, you may need to update the Contact Detail and Project Detail layouts to reflect your fields.

Modify Scripts:

  • The "New Event for Contact - DayBack" and "New Event for Project - DayBack" scripts contain a hard-coded reference (line 11) that points to the ID field in the original table.
  • Update these scripts to reference the correct ID field in your tables.