Elinimating Unused Variables

Is there a way to determine if there are any unused variables in a database and if so, remove them?

Thanks, Paul

Subject: Unused Field Names

Not sure if this is what you want…but it removed unused Field Names.

Subject: Wow, very cool

Tony,

Thanks for the lead. I haven’t tried it yet but it looks very cool!!!

Thanks, Paul

Subject: Just be careful…

That code could still delete fields that you use. If you have fields that are not in any form or view, but are created by and accessed from Lotusscript (or Java), they will be deleted…I frequently use a field called flagDelete, which I set to “Yes” when I want to allow a user to delete a document. The users don’t have delete access to the database, I just let them set the flag and then I have a scheduled agent that runs every hour to perform the actual deletion. That agent is signed by the developer ID, which has delete access in the database.

So, be careful, but in most cases I imagine that code will work. I don’t underatand why the code is not using lists to store the fields, though. Would be much faster, as redimming an array is expensive.

Subject: Will be Careful

Thanks for the warning. I was planning on doing this in an offline copy first to verify do damage is done.

Take care, Paul