Hi all. I am new to Lotus development and have a couple of basic questions.
I inherited a database with many forms and views. This database has only 2 Shared Fields. However, I have seen where people have created a new form by copying an existing form, and all the fields in the new form have the same name as in the original one. Thus it would seem that these are ‘shared fields’ as well. If I enter some information in one form, and then switch forms to the new one, the information appears in those same fields. Can someone explain how this works, and why this would not be an official shared field?
Second - I am creating a view, and when I add a column I see a list of all available fields to choose from in the DB. How can I find which form(s) a field is located on?
Many thanks in advance.
NG
Subject: Finding a field & copying a form
“Shared” items allow a single data dictionry entry for the field. Different forms can have identical definitions, do result in distinct design entries, hence not formally “shared”.Because the Notes system is very dynamic in form and field definitions, it is considered a good practice to name fields according to form or with some other similar common naming characteristic, to allow the ease that you desire. Unfortunately many developers don’t observe “good” let alone “best” practices.
Enjoy.
Collin
http://www.brendemuehl.net
KC8TKA
Subject: RE: Finding a field & copying a form
Thanks for the quick reply Colin. It looks like the DB I’ve inherited was not built with the naming conventions you mentioned.
What confuses me is that there are many forms in this database that have been copied from a few original ones. In the views, where I can choose from a list of fields, only one field will appear for, say, “Employee Name” So I can enter some data in this field on one form, and then switch to another form (which is clearly a copy of the first form) and see the same data in the “Employee Name” field - yet this field does not appear in the shared fields list. Can you explain how this is possible?
Also, is there any way to search the DB to find which form a field is located on?
Thanks…
Subject: RE: Finding a field & copying a form
Design Synopsis can be useful here.The Notes db system is similar to Pick/Revelation/Advanced Revelation in its openness. It takes some getting used to, but has some versatility that’s very practical.
Subject: RE: Finding a field & copying a form
This is by design and is due to the ability/possibility/requirement that you might want to view the same data in a document in several different ways (using multiple forms). The fields have to be the same name for the data to show up in them. Shared fields doesn’t really mean “i want to share these fields between forms”. It just makes it easier for you to do so. Like shared columns, it allows you to define a field in one place, then add it to multiple forms (or views in the case of a shared column). It has the same effect as doing what I mentioned above, it just allows you to control your field definition in one place. For example, if you need to have a combobox field that contains a list of all of your store names, and show this field on your NEW STORE form, your CLOSING STORE form, and your STORE TRANSITION REPORT form, then you can use a shared field and not have to create the field and add the code to populate it on each of those forms.
Subject: RE: Finding a field & copying a form
I see. Ok, thanks Joel and Colin!