Input validation and names field

Hi.

First, a question: does the input validation formula alters only the front-end document or the front-end and back-end documents?

Second, when the input translation formula runs? I thought that it ran when the user leaves a field, but I’m not sure anymore.

I have the following issue: there is a input validation formula in a names field in a doc type X that changes the name format from CN=Name/OU=bla/O=org to Name/bla/org. The problem is that, when I open a document of this type X (dont need to change it to edit mode) and click a button in another opened doc of type Y that queries docs of the type X, the value of the field mentioned above comes without the input translation formula applied.

I’d like to get the expected behaviour: always get the same value in all fields of documents of type X, regardless if it’s opened in Lotus Notes or not.

Thanks in advance.

Subject: Input Translation defined

Hi, Alan. The input translation formula of a field is kicked off when a document is saved, refreshed or recalculated. The input translation formula would not necessarily be kicked off for a particular field when you left that field unless a save, refresh/recalc is triggered. The input translation formula is really a UI feature but of course if a document is saved in the UI the backend would reflect the change EXCEPT in your case and possibly others. Your input translation is trying to change a name to be in heirarchical format in a Names field. Names fields store names in Canonical format in the document itself which is what you will see when you access the backend document. At the UI level, a Names field will display the name in heirarchical format but as mentioned that is not what you will see in the backend.

Subject: Input translation - understading better

Hi, Dave.

If I understood correctly, you said that, in the case of names fields, the input translation only changes the field value in the front-end document, not the back-end document.

The problem is that I don’t get a consistent behaviour in Lotus Notes querying documents with fields with input translation from the database. As I said, in a specific case, I have code in the form of a document of type Y that queries documents of type X (doc type X has a input translation formula in a names field). Notes returns to me the value of a names field (of document of type X) in canonical format only if the document (of type X) is opened at same time; otherwise I get the name in abbreviated format. That made me think that the input translation formula in a field applies to the back-end document too, but only after the doc is closed.

I think this behavior is awkward. I’d expect to always get the same value in a document field, unless the document is edited and saved.

Any help is appreciated.

Subject: further clarification

Hi, Alan. I said in the case of your specific input translation that the backend document will really not be affected from a Notes perspective. The Names field will store the value in canonical format both before and after a document is saved and that canonical format is representative of what is retrieved through the back end document. If you can’t alter what is retrieved via the program your using, then maybe you should add another field to the Notes form you are retrieving from which is a text field(hidden perhaps). In this text field, you can store the Names field in whatever format you want.