Wednesday, August 15, 2007

Names fields, Author fields, and @domain

I posted this on Notes.net but I know many people don't visit there anymore, so I'm repeating it here.

I'm having a rather frustrating problem that it appears many other people here have also encountered. I have a Names field that I use to feed an Authors field. The Names field contains canonical names that include @domain at the end. This causes the names not to work in Authors fields.

For example, I'll select my name in a Names field, and it looks like Charles Robinson/DOMAIN on the screen. When I save the document it refreshes and my name gets expanded to Charles Robinson/DOMAIN@DOMAIN. An Author field which is Computed from this Names field gets set to "CN=Charles Robinson/O=DOMAIN@DOMAIN".

Does anyone know what controls whether the domain gets appended, and how to make it stop?

7 comments:

  1. Charles, the only way I could replicate this behavior was by enabling 'Look up addresses on document refresh' option in the names field, do you need this?

    ReplyDelete
  2. I don't believe I do, I'll take a look at that and see if it's the culprit. Thanks for the suggestion. :-)

    ReplyDelete
  3. Just yesterday, I saw the same thing.
    The names field used the directory (dropdown button) but only a few names would include the domain.
    I think it happened because those names resolved using the personal address book and the address in there contained the domain.

    Since you set the authors field using code, here's a simple way to prevent the problem: @Left(namesfield+"@"; "@")

    ReplyDelete
  4. Since this is a list and it's coming from another field I fixed it by using something like this:

    namelist := "[Admin]" : NotifyField : OtherAuthors;

    @Transform(namelist; "name";
    @If(@Contains(name;"@"); @Left(name;"@"); name))

    I'm fairly certain now that the "look up addresses on document refresh" option, I'll fix that this evening. :-)

    ReplyDelete
  5. Yep, that was it. I wonder why that's not documented somewhere?

    ReplyDelete
  6. this is great information Charles,

    I'd be interested to know if you have any foreign domain documents in your Domino Directory. I see this behaviour pop up quite a bit when there is a Domino fax solution in the mix and most of those use a foreign domain document.

    ReplyDelete
  7. Paul, yes, there is a foreign domain being used for Esker Fax for Notes.

    ReplyDelete