I have a shared field that tells the code in my documents which server is the administration server for the database so it knows where to go to get other information.
When our production server is down and we switch to a backup server, I need to change that value. Is there any way to do this programatically, like with an agent. I could go either with formula or script.
I’d rather not have the task rely on someone having designer rights and the designer client in order to change the shared field value.
Thanks in advance,
Beth
Subject: How can I change the value of a shared field programatically?
In this case, why don’t you create some sort of profile document, to define where is the server will be? Don’t save the server name into your document. Make it computed for display and it lookup from the profile document.
Subject: You have the wrong idea of shared fields
Shared fields are a way to share the design of a field across forms. They do not share the values.
As the other reply suggested, profile documents may be a good way to share some data across the application.
Howard
Subject: How can I change the value of a shared field programatically?
Thanks for both responses.
One question: If the purpose of a shared field is to share the field design and not the value, why is it that the value formula can only be entered in the shared field itself and not in the form on which the field is placed?
To me it’s much easier to have a shared field with a computed-for-diplay value than to go into the whole profile document thing. The only thing about it that is inconvenient is that I can’t alter the value or formula programatically - I must use Designer to change it.
Anyway, I got around the whole issue by simply getting rid of the shared field and using the administration server property of the database acl, but that involves setting a memory variable 4 or 5 times in the code rather than simply referencing a field on the form. Oh well.
Thanks again,
Beth
Subject: RE: How can I change the value of a shared field programatically?
“To me it’s much easier to have a shared field with a computed-for-diplay value than to go into the whole profile document thing.”
How’s that? One requires Designer access, even if it doesn’t require the client, and in a process-controlled environment, would require jumping through the hoops of a change management procedure to implement. The other simply means editing a document. What you are changing is configuration data – it should be accessible and changeable as data.
Subject: RE: How can I change the value of a shared field programatically?
Ummm… (shifting nervously in her chair)… I guess I meant it’s easier for ME because I have never used profile documents in Notes. I was going to look into them once but couldn’t find much information on what they were used for or how to create and use them. And, because I’m the sole Notes person in our office of 30 users, it never seemed to be that big of an issue. This is not a process-controlled environment.
But I see your point. Thanks.