GohdanTheMoblin
asked on
Names field validation mystery
I'm somewhat new to Notes and using Notes 5.0.5.
I want my document to have a field with similar functionality to the "SendTo" field in the mail database. I want a user to input a name and if the name is not found in any address books I want the field validation to fail. SendTo does this perfectly in the mail database, but I can't seem to mimic this behavior in my database. I have copied the properties of the SendTo field exactly in my field but nothing seems to make the field validate itself. I thought that perhaps using "Use Address Dialog for choices" would help, but it did not.
I have copied every property and even the Input Translation for the SendTo field, but it still will not perform a lookup. Is there some trick to getting it to work? Is there some database setting that must be done? What am I overlooking?
I want my document to have a field with similar functionality to the "SendTo" field in the mail database. I want a user to input a name and if the name is not found in any address books I want the field validation to fail. SendTo does this perfectly in the mail database, but I can't seem to mimic this behavior in my database. I have copied the properties of the SendTo field exactly in my field but nothing seems to make the field validate itself. I thought that perhaps using "Use Address Dialog for choices" would help, but it did not.
I have copied every property and even the Input Translation for the SendTo field, but it still will not perform a lookup. Is there some trick to getting it to work? Is there some database setting that must be done? What am I overlooking?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think it's not in the field itself, but either in the Notes client or in the QuerySave event of the Memo form. The latter checks a lot of things. Look into the ScriptLibrary called CoreEmailClasses, with the MemoObject class.
ASKER
I checked the QuerySave event and it just calls EmailSave in the EmailProcessing Script Library. This does quite a few things but never references the SendTo field.
If it is indeed a Form property then I am in a pickle. This form is not mailed; I have a Sub that generates a mail document and sends it to the appropriate person. Perhaps I can find a way to play with MailOptions and the form's properties to trick it into working until I am done with it.
If it is indeed a Form property then I am in a pickle. This form is not mailed; I have a Sub that generates a mail document and sends it to the appropriate person. Perhaps I can find a way to play with MailOptions and the form's properties to trick it into working until I am done with it.
ASKER
Does the invalid address raise some kind of trappable condition? When I press F9 to refresh it is happy to report the error, but when I save my document it doesn't complain at all.
Shouldn't unchecking "Allow values not in list" make any entry not in the address books invalid?
Shouldn't unchecking "Allow values not in list" make any entry not in the address books invalid?
GohdanTheMoblin, Sorry I have to take back my previous comment...
Use lookup name as it is entered option + refresh document option for your names field.
When you enter name and hit "," it should bring up the dialog...
Use lookup name as it is entered option + refresh document option for your names field.
When you enter name and hit "," it should bring up the dialog...
ASKER
I managed to solve my problem with a bit of a workaround. I made the field a computed field and controlled its value through a button with a @Picklist. It's not the prettiest in the world, but I don't know that there is a way for my logic to incorporate the names field.
HemanthaKumar you answered the question that I asked so you get the points.
HemanthaKumar you answered the question that I asked so you get the points.