Only See My Events

How can I ensure a user only sees their own records?

DayBack respects the access rules from your original source (Salesforce, Google, etc.). If a user cannot see or edit an item in the original application, they will also be unable to see or edit it in DayBack. However, you might want to further restrict visibility within DayBack. Here are some strategies to achieve this:


Salesforce Specific


Sometimes, a user is allowed to see all events, but you prefer to focus their view on their own items. Here are some methods:

Pre-filtered DayBack Calendars:

  • You can embed DayBack calendars on individual Salesforce pages, filtered to show only events for the logged-in user. Alternatively, you can add a DayBack instance to the home page to display only the logged-in user's events. Detailed instructions and videos for this setup can be found here: Custom Calendar Tabs in Salesforce Lightning.

Field Mapping Filters:

  • You can embed a filter in the fields mapped to DayBack to return a subset of records. This is a popular method for focusing user views. Learn more here: Pre-filtering in DayBack for Salesforce.

Custom App Actions:

  • DayBack's custom app actions allow you to add your own behavior when the calendar starts up. You can use custom app actions to limit the calendars or resources presented to the logged-in user. Details and examples can be found here: Custom App Actions.

FileMaker Specific

You can easily restrict the events a user can see using FileMaker's built-in Access Privileges. These allow you to create rules about which records a logged-in user can access.

If you haven't worked with FileMaker's Access Privileges before, take a moment to read the overview in FileMaker's built-in help. Look under Contents > Protecting databases with accounts and privilege sets > Creating and managing privilege sets > Editing record access privileges.

For more information about limiting which records a user can see, refer to the "Editing record access privileges" page, focusing on the "Limited" option under number 4.

Tips & Tricks

The main challenge is finding an attribute of the user's login to tie that login to a record in the calendar's events table. You can use Get(AccountName) and Get(AccountPrivilegeSetName) . The privilege set name is generally used for broader roles like "administrator" or "sales rep," so you'll likely use Get(AccountName) in your access privilege calculations to compare a logged-in user with the user linked to an appointment.

Here are two basic approaches:

Approach 1: Matching User Account Names

  1. Ensure user Account Names match a field already in the database, such as the real first and last names of your users. For example, account names like "Bill Smith."
  2. Use an access privilege calculation to allow the logged-in user to see only their appointments:
Not isempty ( FilterValues ( List ( SampleEvents::UserNameFirstLastCalc ) ; Get ( AccountName ) ) )

Ensure this calculation is set to evaluate from the context of the same table occurrence used for your Source No 1 layout. This calculation returns 1 if the Account Name is one of the users linked to the appointment, and 0 otherwise. Note the absence of the = sign, as appointments can have multiple users. Instead, FilterValues checks if the Account Name is a member of the users on the appointment.

Approach 2: Recording Account Names

  • Create a field in a users table to match the account name, recording the account name in FileMaker. Do not record user passwords in FileMaker for security reasons.

Performance Considerations

If your username is not indexed in the events table, this calculation can slow down the solution as FileMaker checks related information for each event it displays.

Adding Power Users

To allow some users to see all appointments, assign them to a different privilege set that doesn't limit the appointments they can view.

Mapping DayBack Usernames

Note that this approach uses the FileMaker account name, not the DayBack username (often the user's email address). If you're on a version of DayBack Classic, you can map DayBack usernames to real FileMaker accounts in the PHP relay file on your FileMaker Server. This step is not necessary for DayBack for FileMaker 19 and higher.