Reader field

Good morning

I’m working on a db that requires a reader field within the main form. Only users that are named in the DirectorName field, DirectorBULeader & DirectorBURMP fields and users with the UK RMP Approval role should be able to access the forms, i’ve got the formula below but its not working, and anyone can access the form regardless of role or if they are named in the above fields in the form

@If(@UserName=DirectorName: DirectorBULeader:DirectorBURMP) | @IsMember(“[UK RMP Approval]”; @UserRoles)

Any help appreciated

Subject: Reader access is based on what’s stored in the document

A Computed for Display field can’t be used to control reader access. Access to the document is based on the values stored in the document. If the stored Readers field matches the user’s name, groups or roles, the user has access. Computed formulas that use @UserRoles and @UserName will never work, because you have to calculate the value once for all users.

Here’s what your Computed Readers field should be (assuming I’ve understood your intention):

@Trim(DirectorName: DirectorBULeader:DirectorBURMP :“[UK RMP Approval]”)

tool to analyze whether current user can read/edit a document

Compleat Reader and Author Field Troubleshooter