Linked column in access rules

  1. I have a “employee” table with one column being “email”
  2. I have another table called data where each employee can enter multiple rows.
  3. I created access rules as follows:
    if user.Email == data.Email allow R U C D
    This was working so far.
  4. Then I changed “email” column in data table to be a reference column in “employee” table.

This is where access rule broke. I am not able to figure out how to match logged in user’s email with table’s email’s field when the field is a reference.

Your rule says data.Email but I assume you mean rec.Email. Since that’s a reference to the employee table (that just happens to display an email), I suggest renaming the column to Employee. Then use this formula:

user.Email == rec.Employee.Email

Here rec is the record of the ‘data’ table, and rec.Employee is the referenced record of the employee table.

Alternatively, take a look at the setup in the video in Intro to access rules - Grist Help Center titled “Understanding reference columns in access rules”.

Thank you. Instead of matching email, I had to switch to matching record id. Now it is working.