Hi,
I have created a TV episode script database for one of TV programs. I have created a form wherein our writers will create their scripts. This form has a status field which can have 2 values - Draft or Final. The writers can edit the document as long as the Status field is equal to “Draft”. But once the program Producer have set the Status field as “Final” the writers should no longer have editorial access to the document… How can I have this feature added?
Thanks in advance…
Randy
Subject: How to prevent a user with editor access from editing a document based on a field value?
Another option is to change document’s form when saving as “Final” (similar form, but with computed when composed fields instead of editable).This is good for both Notes and browser, which is not always the case when using various “on open” events.
HTH,
Simeon
Subject: that will not work…
No… that will not do. Users just selects view\switch form from the menu.
As I wrote use Author fields.
They are there for exactly this purpose.
Notes/Domino has strong security features ! …use them! 
regards
Jesper Kiaer
http://www.jezzper.com
Subject: RE: that will not work…
You’re right - I didn’t think about this.
Thanks Jesper!
Subject: How to prevent a user with editor access from editing a document based on a field value?
Hi
Use the queryopen and querymodechange events of the form.
Something like:
if source.fieldgettext( “status” ) = “Final” then
Messagebox( “Sorry, script finalised. It can not be edited.”,16,“Access Denied!” )
continue = “False”
End if
You will need it for both queryOpen and QueryModeChange events because (if i remember rightly) , using Ctrl-E to edit the document bypasses the queryopen script.
HTH
cheers
andyG
Subject: How to prevent a user with editor access from editing a document based on a field value?
Just to point out that you might be able to do this through your UI (i.e. in the Postopen event of the form) but if the user accesses your database through other means (Lotus Script, etc.) then being editor allows them to modify any (unencrypted) document in that database - you cannot stop them.
The encryption point is something you could use. If you encrypt a document, only those users with the encryption key can modify them, regardless of their access rights.
Subject: How to prevent a user with editor access from editing a document based on a field value?
Jesper is correct: Author fields are definetly the way to do this. In addition Andrew’s method to use the querymodechange event is an excellent suggestion.I would also add to this to place the author field at the very bottom of the form and make it a computer field. You could then include a formula that runs something like:
finalnames := “name1” : “name2” : “[role]”, etc.
draftnames := "name1 : “name2” : “[role2]”;
@If(status = “Final”; finalnames; draftnames)
Subject: RE: How to prevent a user with editor access from editing a document based on a field value?
Hi
Not wanting to get on the wrong side of anyone, but author fields would not necessarily be the answer in this case. Author fields would be the solution if you had specific projects for each group of writers to handle. e.g. scripts for ‘TV program A’ to be handled by ‘writer team A’ , ‘program B’ by ‘team B’ etc. In this instance, all the writers have editor access to the database, but access is then restricted to each document based on the author fields. i.e. if you are in the right group you can handle that script
The question posed by Randy was to prevent editing when the script status was set to ‘final’. I read the situation as all writers have access to all scripts (regardless of program) until the status is finalised by the ‘producers’. It was based on this assumption, that i posted my original response.
I only make these comments to ensure that the solution implemented is not more complex than it needs to be. If Randy sees that his database will grow and require the spliting of scripts between teams, then i would suggest implementing Author fields now, along with the queryopen and modechange events.
hoping not to have offended anyone
andyG
Subject: Sounds like an interesting application, I’d love to hear more about it.
If you are interested, you can contact me at alan~UNDERSCORE~lepofsky@us~DOT~ibm~DOT~com
Subject: Use Author fields
Hi
The proper way to get about this, would be by using Author fields.
regards
Jesper Kiaer
http://www.jezzper.com
Subject: How to prevent a user with editor access from editing a document based on a field value?
Thanks everyone for your suggestions… I’ll take everything into consideration.
Randy