Removing unused fields from database

50 pts.
Tags:
Lotus Notes Database
NSF
Very often when you are developing a database you create some fields and afterwards you realize you don't need that field. It is true also when you copy an old form, even though you previously deleted unnecessary fields. When creating a view you will see that the names of those fields are still in the field selection of the programmer panel. How can we erase those bothering fields? I already tried to copy the DB or to use the load compact mydatabase.nsf -C option…..unsuccessfuly Temujin

Answer Wiki

Thanks. We'll let you know when a new response is added.

You not only need to get rid of any design elements that have the unwanted field, you also have to get rid of any documents that have the unwanted field. Then do a compact.

<b>Note:</b> If you need to retain the documents, develop an agent to delete the field from all documents, then compact.

Thanks Stilleto…..but…….How?

I am afraid that FIELD myfieldname := @DeleteField only erase the content (data) from the field not the field itself.
Regards

Sorry, but I disagree. It most certainly does erase the field itself from the doc. If it didn’t do that when you tried it, then you either still have the field on a form, have it created with some code (like a form event), etc. or have a problem with your installation. Maybe you should try using the synopsis feature to search for occurrences of the field name in the design…

Stilleto thanks for your answer………
I am not trying erase the field from the doc. What I need is that the unwanted old fields stop appearing in the tab REFERENCE \ DATABASE FIELDS of de Programmer´s Panel on the Designer Client, so i dont have to deal with that long list, especially ………when you copy an old form into the new DB………
regards

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Stiletto
    I'm assuming you're asking about brooklynegg's comment regarding an agent to delete the field... Since you know about doing design work, I'll just tell you that the important command is FIELD myfieldname := @DeleteField Create an agent to execute that against all docs, or selected docs that you select.
    3,870 pointsBadges:
    report
  • Brooklynegg
    Josenoel: You seem to want two things -- keep the fields in records and stop them from appearing in the list of available fields. However, you cannot have both. If you want the field to be removed from the list of fields that can be chosen within Designer, you must remove the field from all forms and subforms, and run an agent that affects every record that has the field that uses @Deletefield to remove it. These are your only options. Are you trying to describe a way to have a list of "favorite fields" that would be the default list so the common fields are generally available, but keep the other fields in a full list? That would be kind of cool, but it definitely is not a current option. Maybe when Designer is offered within Eclipse someone will write a widget that will provide that function. If this is offbase, please further clarify your problem so we can address it.
    3,845 pointsBadges:
    report
  • Joeydog
    What type of Compact should be used?
    110 pointsBadges:
    report
  • Joeydog
    Copy style -c worked - usused fields are gone!
    110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following