Readers Field Question

Hello,

I have a database template, which 4 production databases use to inherit from (4 different Centres). I have a DocAuthors field, which is working fine, and I have 4 roles added, one for each Centre.

Recently I have been asked by one of the Centres to hide all documents from one of their departments from another department, where in the template, everyone can see everyone elses, as long as they have the role.

I thought of adding a Readers field to the form and having this formula:

@If(Centre=“CentreD” & RemoteCentre=“DeptDA”;“[DAEditors]”:“[DEditors]”;“[AEditors]”:“[BEditors]”:“[CEditors]”:“[DEditors]”)

This doesn’t appear to be working. I can see all the views, and I can see/edit the documents. I’ve got a test ID which I’m using which only has the role “[CentreDAEditors]” assigned.

I’ve checked the Readers field on the form and it is a Readers field, and it does have the other roles selected and not the one my test ID is assigned to, so I’m not sure why I can see it under my test ID?

Any ideas?

Thank you,

Hayley.

Subject: Readers Field Question

Hi Hayley,

Your formula as constructed will give read access to either the DA and DE Editors or all the locations.

I’m thinking you might need something like:

@If(Centre=“CentreD” & RemoteCentre=“DeptDA”;

“[DAEditors]”: “[DEditors]” :“[DEditors]”;

“[DAEditors]”: “[DEditors]” : “[AEditors]”:“[BEditors]”:“[CEditors]”)

this gives the DA and DE in both cases, but restricts location D based on the IF conditions

Subject: Readers Field Question

The flags on the authornames field grant write and read access. So adding a readernames that excludes people isn’t enough if they are already included in the authornames field.

Subject: Ignore. Accidental duplicate post

Subject: Readers Field Question

Thanks to everyone who responded to this question. I have now got it to work by adding the same code in the DocAuthors field and the Readers field.

Thank you again.

Hayley.

Subject: Readers Field Question

Another thing to check… does your readernames field have the allow multi-values checkbox turned on?

Subject: Readers Field Question

Apart from what has already been mentioned, keep in mind that a computed field on the form won’t do anything to existing documents until after they’re edited/refreshed and re-saved. Read and write access is controlled by the document content, not the form content. An agent with the formula @Command([ToolsRefreshAllDocs]) will take a while to run, but will add the field with the appropriate flags to the documents.

Subject: Readers Field Question

Thanks for everyone’s feedback. It’s still not working. I have refreshed the documents as well.

I do have a DocAuthors field, and it does have all the roles assigned to it, but this is needed. All roles should be able to create from the same form, but when it come to reading documents, I am wanting to add the security as CentreD can see CentreD and DeptDA’s documents, but DeptDA can only see their own, and not CentreD’s.

Subject: RE: Readers Field Question

Hopefully someone can confirm this, but i believe that anyone listed in an Authors field is automatically given read access as well. After all, what’s the point of being able to edit something if you can’t read it?

Perhaps you need to change your Authors field so it is computed in the same way as your new Readers field, and have a look at the ‘Who can create documents with this form’ section on the Security tab of the Form properties to control who is actually allowed to create documents with the form.

Emily.

Subject: RE: Readers Field Question

Just found the thing about Authors and Readers in Designer help. It’s in a document entitled “Access-controlled forms and documents” and it states that:

"The following people can read a document that has restricted Read access:

* Users assigned Read access in the form access list

* Users listed in the form's Readers field

* Users listed in the form's Author's field"

Subject: RE: Readers Field Question

Exactly. So the relevant role must in the AuthorNames field must be split in two. One of the new roles will be the people who can always read, but the other role will be the people who can only sometimes read – and that role must be removed from the authornames field for the docs that they are not supposed to read.