@SetDocField not working as I thought

I have a discussion database based on the discsw7.ntf template. I have added a field in each form called responder, which needs to be cleared in a reponse documents parent, if the current username matches the name in the ‘Responder’ field in the parent document.

The formula in the post save event goes like this:

@If(@GetDocField($Ref; “Responder”) = @UserName;@SetDocField($Ref; “Responder”; “”);@False)

When I respond to my own post, the @SetDocField works fine, and sets the Responder fieled to “”.

If I load someone elses name into the Responder field in a parent document, and get them to create a response to it, the Responder field does not get set to “” when their postsave event is run.

Is this because they are not able to modify a document that they did not create, or am I doing something else wrong?

Subject: @SetDocField not working as I thought

If the other user appears as an Author in the database ACL, then your first idea is most likely: they are not able to modify a document that they did not create.

Try setting the other user’s access level to Editor, then get them to close and re-open the database and try creating another response. If the Responder field gets cleared this time, you have your answer.

Subject: RE: @SetDocField not working as I thought

Thanks Scott.

I changed them to having editor access in the ACL and everything is now working as it should. Great advice.