Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Authors field doesn't work

Authors field doesn't work

Authors field doesn't work


I have a computed author field called "Auteur" with this formula  :


In order to give the right to the user to modify the doc if he has the [AdminMenu] role.

.. But it doen't work

- The field "Auteur" contains the full canonicalised name
- I have ceated another field with the  @autor formula in order to check where is considered as an Author, an it returns the User Name, and that seems to be right.

I don't know why it doesn't work...

RE: Authors field doesn't work

You are confused about how the author type field works.
The author field must contain the names of the people, groups or roles that can modify. Therefor, you have no need to write a formula to check, since Notes does the check itself.
If users with the role [AdminMenu] are entitled to be author of the document, then you need to put "[AdminMenu]" in the field.
That's all.
Oh, by the way, you might want to read this FAQ (FAQ73-5664) on Reader and Author fields. It could help you in the long run.


RE: Authors field doesn't work

Ok yes, I tryed in a new database and it's working !

But I do the same in my database and itsn't working.
I have a lot of old fields (fields i doesn't use in any form but wich are still proposed in the programmers panel although I deleted them ..).
Maybe this is "poluating" my database.. Is there a way to suppress them ?

RE: Authors field doesn't work

You say that you are using a role to check Author access - are you testing locally on your Notes client, or is the database hosted on a server ?
Because if the db is local, then the Notes client does not check for roles. Actually, when a db is stored outside of a Domino server, the Notes client ignores the ACL entirely - unless you check the option "Enforce consistent ACL across replicas", which is on the Advanced panel in the ACL properties of the database.

My guess is that you are not using a Domino server, and that is why the roles appear to not function.


RE: Authors field doesn't work

- Yes, I'm testing locally on my Notes client.

- Ok i didn't know that the UserRoles arn't cheked by the NotesClient. But I tested the base with the user names.

What about the "fantômes" fields in my database ?
Are they a possible cause of my problemes ?

RE: Authors field doesn't work

Testing with users is the same if the Author field has roles in it. The users will not be recognized as having the role, so they will not be author.
You really should have a test server to do your development on. Makes things a lot simpler.


RE: Authors field doesn't work

I should say in my precedent post :

-.... tested the base with the user names in the author field.


RE: Authors field doesn't work

I found the probleme source:

I didn't say that the document was created with a action view button.
The code :


Sub Click(Source As Button)
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim NomSite As String
    Set db = session.CurrentDatabase
    Set doc = New NotesDocument (db)
    NomSite = Inputbox("Nouveau site","Nouveau Site","")
    If NomSite = "" Then
        Exit Sub
    End If
    Call doc.Save(0,0)
End Sub    

Whith this code when i created a document "A" with the user Toto with author acces lotus didn't allow Toto to modifie this document Although Toto was in the author field
( when i looked on the document properties my author field didn't appear as a author fied
=> indicateurs de champ : SUMMARY "CN=Toto/O=Toto" )

but when
- I pass Toto  in Editor
- Toto modifi the doc "A"
- I Pass Toto in Author
- Toto is allowed to modifie the doc "A" (marvelous)
..ans the properties of the author field looks like a Ahthor field.

So i though the way i created the doc an fill the fields wich is'n good..

The Code witch is working


Sub Click(Source As Button)
    Dim workspace As New NotesUIWorkspace
    Dim uidoc As NotesUIDocument
    Dim NomSite As String
' saisie du nom du site    
       NomSite = Inputbox("Nouveau site","Nouveau Site","")
        If NomSite = "" Then
       Exit Sub
         End If
'création du document en avant plan    
        Set uidoc = workspace.ComposeDocument    ( "", "", "RepasSemaine" )
    Call    uidoc.FieldSetText("RepasSemaineSite", NomSite)
    Call uidoc.GotoField("RepasSemaineChoix")
    End Sub

However what will i do when I would need to create document without to show it to the user .. ( euu Will i ever have the utilitie od that ?) (hummm escuse me for my english)


RE: Authors field doesn't work

Creating a document can very well be done in the backend.
For example, if you want to create a Memo, all you need to do is create a NotesDocument, fill in the necessary fields, and use the ComputeWithForm method before saving it.
That way, the document you save will be just as if a user actually created it in the client.
Of course, the Memo example may not be the best - the mail template must be one of the most complicated designs ever made for Notes. But in your case, you should very well be able to do that.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close