50 pts.
 Removing unused fields from database
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

Software/Hardware used:
ASKED: October 6, 2008  5:58 PM
UPDATED: February 15, 2011  4:48 PM

Answer Wiki:
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
Last Wiki Answer Submitted:  October 25, 2008  11:58 am  by  Stiletto   2,700 pts.
All Answer Wiki Contributors:  Stiletto   2,700 pts. , Josenoel   50 pts. , Brooklynegg   3,845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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.

 2,700 pts.

 

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 pts.

 

What type of Compact should be used?

 110 pts.

 

Copy style -c worked – usused fields are gone!

 110 pts.