Thursday, December 23, 2010
Removing unused field names from your Notes application design.
Hello Developers,
If you have been doing Notes development for any length of time, you have run into this situation. Coping an existing application as a starting point for a new app, change the form design, go to create a new view, and your list of field names to select from has both sets of field names from both apps. And a worst case scenario appear, you end up with a damaged design because you have too many unique field names or the length of all the field names is larger than supported by Notes. You do a search on discussion forums and find instructions on how to remove unused field names, but for some reason they don't quite work. That's certainly been my lot in life with this process...
I found the following Knowledgebase item the other day, I tried this and much to my surprise, I was able to remove unused field names! I think the key for me was the compact step. In the article, they give you a command line way to run the ncompact task. I think I was just assuming I could do that through the client (either Notes or Administrator) and it never worked. When I used the command line version of the compact, it worked like a that....
So... To save you the same pain, here's the entry...
Deleted Fields Still Showing in List of Fields When Writing Formula
Problem:
In Notes R4 and later, fields that you have deleted from your database are still listed when you are writing a formula and click on the Fields & Functions button.
Content:
Whenever a new field is added to a database, it is added to the Unique Field List. The Unique Field List is used in the Fields & Formulas dialog box in R4 and the Reference tab's "Database Fields" list. A new field can be added to a database by adding it to a design element, a document, or depositing a document into a database that contains new field names. If the field is deleted or renamed in a document and/or design element, it will remain in the Unique Field List until the database is Compacted. When the Compact process runs, it will scan all documents and design elements to recompile the Unique Field List. If the field does not appear anywhere in the database, it will not appear in the Unique Field List after Compact has finished.
If the database is flagged as full text indexed, the fields will NOT be removed from the list of fields by Compact. Delete the full text index by using the Database Properties InfoBox (File, Database, Properties, click the Full Text tab, and click the Delete Index button), and then Compact the database.
So, the proper steps to delete unwanted fields from the field list would be:
1. Delete the field(s) from all documents in the database.
2. Delete the field(s) from the design of all forms and subforms in the database.
3. Delete the database's full text index.
4. Compact the database.
In one known customer case, after trying the solution presented above, it was discovered that a corrupt subform was the culprit. Copying and pasting the subform did not resolve the issue; however the following actions allowed the unwanted field(s) to be removed:
1. Select all the design elements on the subform.
2. Copy the elements to a new subform.
3. Delete the original subform.
4. Compact the database.
Note: One method of ensuring that the unwanted field(s) are no longer in the database is to perform a design synopsis of the entire database (File, Database, Design Synopsis), and then search the synopsis for the field name(s).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.