[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 367
  • Last Modified:

Values from fields still in view after they deleted from form

I have a view that is filling itself with values of fields from a form.  I have renamed fields, and deleted them etc in the process of creating this application.  I am noticing that fields that have been deleted, renamed, etc are still able to be selected by the view.  Why is that?

Thanks!
0
TheRookie32
Asked:
TheRookie32
  • 13
  • 7
  • 5
  • +1
2 Solutions
 
BroadAustraliaCommented:
Hello,

Have you tried rebuilding the view?  ( hold down CTRL & SHIFT and then press F9 )

Lotus Notes should then display "rebuilding all database views" with a progress bar...

Depending on the size of your database this could take some time.

Regards

Broad.
0
 
marilyngCommented:
If you saved the form with the document, then you have to either rebuild those documents to detach the form, or run a @Command( [ToolsRefreshSelectedDocs] ) on all documents, and then compact the database to remove the fields no longer in use.  It would be better to throw a new replica with no documents, and then copy and paste the ones you want to the new database.

You also might have to send an agent through every document and specifically delete those fields.
0
 
Sjef BosmanGroupware ConsultantCommented:
Could you tell us what you did exactly? E.g. how did you delete those fields? Usually, F9 will do, or even reopening the database. Otherwise, rebuilding the view(s) is a very good idea.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
marilyngCommented:
Rebuilding the views won't do it if the fields were deleted after documents were created.   Redesigning the views so that the former fields don't appear in them would do it :)

But agree we need more information.
If you had documents with fields A, B, C.  
and created views to show fields A, B, C.

Then you deleted the fields A, B, C, off the document forms, but Fields A,B,C will still exist on the created documents irregardless if you remove the field off of the form.

If you remove the fields A, B, C from the view column formulas in the DESIGN then these columns will no longer show the values.  However, that still won't remove the fields  A,B,C and their values from the existing documents.  You would then have to run an agent to delete fields A, B, C and the values from the documents.

Refreshing might not do it folks.:)  Unless, of course, I've mis-read the question.
0
 
Sjef BosmanGroupware ConsultantCommented:
Indeed, that's my question with "how did you delete those fields", from the form or from the documents. I assumed from the documents...
0
 
TheRookie32Author Commented:
Sorry I am very new to Lotus and need to watch the words i am using.

I had a form i was building with 3 fields on it...  A, B, C, D.  I then created a view (calender style) and linked the view columns to each of the fields.  

I think i added a few 'documents'  (which are essentially rows in the database) to the calender to test it...

Then i renamed some of the fields to different names and changed the columns in the view to display the new field names.  I also deleted field D from the form.  I noticed in the view, when selecting fields to go in the columns, the old field names are still there.

How do i get rid of the old ones?  I have tried (CTRL & SHIFT, F9) (when i press that I dont see a progress bar...)

I have also tried to delete all documents from my view as well...
0
 
Sjef BosmanGroupware ConsultantCommented:
> I have also tried to delete all documents from my view as well...
That would definitely remove those fields :)

> documents are essentially rows in the database
No, that's not true. You are trying to compare Notes to an SQL database, and that's a very tricky thing to do:
- Notes is a document database
- A document could be defined as an entity that contains items, no more, no less.
- For presentation purposes, there are forms and views.
- Generally speaking, a view contains the information of ONE document per line.
- When a document is opened, e.g. from a view, a form is searched to present it to the user.
- Usually, an item in the document with the name "Form" tells Notes what form to use.
- Data from the document is fed to the form, usually the fields are filled with the data from the items with the same name.

This means that a view can contain ALL documents in the database, with ALL forms that are ever used, even with documents that contain the name of a form that no longer exists. More weird things are possible, but you must already be thinking "What the $%^& is he saying!?"

Bottom line: like a paper folder, Notes contains documents of any sort or type. Views are used to present subsets of documents, with information from those documents. Forms are used to create or modify documents.

In your case, a calender is no more than a special view, expecting certain columns and values.
0
 
TheRookie32Author Commented:
Cool thanks for the explanation! ... any ideas on why the fields that were deleted, renamed are still showing up in my view?  :)
0
 
TheRookie32Author Commented:
"> documents are essentially rows in the database
No, that's not true...."
@sjef bosman - documents are rows in a view then basically?

As i have deleted everything from my view and the fields are still showing up...
0
 
Sjef BosmanGroupware ConsultantCommented:
When do these fields show up? In the Designer? To completely remove them, you need to compact the database: Notes client, on the WOrkspace, Database Properties, 2nd tab, Compact.
0
 
TheRookie32Author Commented:
Yes in the designer when i am selecting different fields to store in the columns is when i can select fields that have either been deleted or renamed...

i compacted the database and they are still there...  :$
0
 
TheRookie32Author Commented:
0
 
BroadAustraliaCommented:
Hi Rookie,

We understand the question now -- and actually it was something I have been wondering about for awhile myself.

Try this solution here:
_______________________________________
Removing old fields from Notes applications
How many times have I tried to follow the documentation’s instructions, only to fail miserably and make do with’em. I’m talking about all those old unused field names, of course, which seem to want to stay around forever when you reuse an existing application as the basis for a new one. Well, not anymore…

From DuffBert’s Random Musings:

So, the proper steps to delete unwanted fields from the field list would be:

Delete the field(s) from all documents in the database.
Delete the field(s) from the design of all forms and subforms in the database.
Delete the database’s full text index.
Compact the database.
Copy-style compaction must be used in order to rebuild the UNK table. In Notes R4 copy-style compaction was the default on the Client and the Server. In Notes R5 and Notes R6 copy-style compaction must be specified from a command prompt.
From the Domino server one would execute: lo compact database.nsf -c
From a Notes Client (example is for Windows) one would execute from the Notes directory: ncompact \dataparth\database.nsf -c
And it works! Just make sure you exit your Notes Client and/or Designer before running the command…
_______________________________________

This was taken from ( http://arseneault.ca/blog/2005/09/28/removing-old-fields-from-notes-applications/ )

Let me know if this solves your problem...

Broad
0
 
TheRookie32Author Commented:
How do i delete the database's full text index?

How do i compact the database from the command prompt?

sorry :$
0
 
TheRookie32Author Commented:
seems like lots of steps to go through JUST to remove items that arent even there!
0
 
BroadAustraliaCommented:
I know !!

Delete Full Text Index:  When in database click FILE  |  DATABASE  |  PROPERTIES...    Go to magnify glass tab and click DELETE INDEX.

Are you running Lotus Notes locally or from a server?

Broad.


0
 
TheRookie32Author Commented:
when i click the delete index button I get a message that says "The selected database is not full text indexed."

locally...
0
 
BroadAustraliaCommented:
Exit Notes client & designer.

Go to the properties of your Lotus Notes icon to see where it is installed  usually ( C:\PROGRAM FILES\LOTUS\NOTES    or   C:\LOTUS\NOTES )

Then click START  |  RUN,   type in command and press enter.

Move to the directory Lotus is installed in.  (  cd c:\progra~1\lotus\notes  )  hit enter.

Prompt should now have path in it....  C:\PROGRA~1\LOTUS\NOTES>_

Now type  compact yourdatabase.nsf -c   and press enter..  What output do you get?

Broad.






0
 
BroadAustraliaCommented:
woops,  for last direction try

ncompact database.nsf -c

note    n    infront of compact


sorry ;)

Broad.

0
 
marilyngCommented:
Hi Folks.. downloaded the file from post, there are no documents in it, no documents show up in the view, no full text index.

That is File>>Database>>Properties>> Documents=0, there are 7 delete stubs, which can be eliminated by using the space saver, replication setting (File>>Datatabase>>Properties>>Replication Settings>>Space Savers>> CHECK "Remove Documents not modified in the last" and then set the "90" days to "0"),  after computer buzzes a bit, change it back to UNCHECK, and "30" days.

There are only 4 fields on the form, but about 25 fields that are echoes.  And the database has only one form, one frameset and one view.

And the view in question was nested in a frameset... so cache comes into play.. :)  This is one of those times when if you want to see updates, you have to delete the icon off your workspace, remove it from designer,  and then reopen it to clear your cache.

Form/database itself is the issue.  Paste form into a new database, and you get rid of most of the extra fields, except for an additional four - some are database maintenance things, like originalMODtime...FORM... two are unknown.

All of the following will get rid of echo fields (fields that you once had on the form)

                           File>>Database>>new copy, and only copy design.
                           Ok, instead of four + 25 fields, I'm seeing 8, I'm thinking the other four are database generated.

                           File>>Database>>new replica, returns 8 fields instead of four.

However, none of these worked on YOUR form in YOUR database.  The 25 extra fields show up with no documents in the database, but they don't show up in the view.

Diagnosis: corrupt database, corrupt local cache on your client.

solution: throw a new copy of the database, delete the form and start over, remove the icons from your workspace, close notes, delete cache.ndk, move the old copy of the database somewhere else. reopen notes.

Any of this make sense?
0
 
Sjef BosmanGroupware ConsultantCommented:
> ... seems like lots of steps to go through JUST to remove items that aren't even there!
You're absolutely right! One of the many "interesting" aspects of Notes :)
0
 
TheRookie32Author Commented:
so basically recreate the entire app (I say entire lightly as it is very small) and start over?!  What if this were a big app with lots of fields etc?  Seems like a rather easy task that Notes should be able to perform...  Is this just one of many things about Notes that will have me pulling my hair out?
0
 
TheRookie32Author Commented:
@ Broad:

output from your compact from command prompt method:
"
C:\localNotes\Data>compact BirthdayCalender.nsf -c

 Listing C:\localNotes\Data\
 New files added to this directory will not be compressed.

   393216 :    393216 = 1.0 to 1   BirthdayCalender.nsf

 Listing C:\localNotes\Data\
 New files added to this directory will not be compressed.


Of 1 files within 2 directories
0 are compressed and 1 are not compressed.
393,216 total bytes of data are stored in 393,216 bytes.
The compression ratio is 1.0 to 1.
"
0
 
TheRookie32Author Commented:
if i delete the cache.ndk file, will that screw anything up?
0
 
Sjef BosmanGroupware ConsultantCommented:
No, you don't have to start over! You just have to ignore these dumb fieldnames, it just one of the many weird things in Notes.
Before you delete cache.ndk, be sure to close Notes.

0
 
TheRookie32Author Commented:
deleted the cache.ndk, field names are still there... oh well.  will try marilyng's post above...
0
 
Sjef BosmanGroupware ConsultantCommented:
IMHO you're wasting your time. You'll never get it right, because the next time you delete a field, you'd have to go throught the same story once again. Leave them be, I'd say, and who cares. Why do you want to remove them? Because it's neater? Or do you have some other goal? There are tools that do some very good reporting about the design of a Notes database. See www.teamstudio.com for some examples.
0
 
TheRookie32Author Commented:
I want to delete em cause im a neat freak.  :)  I just feel it would be 'cleaner' if there were only the fields available to you in the view.  :P

oh well...
0
 
marilyngCommented:
Just a quick suggestion... and in answer to your question about how does Notes handle this in a production database.  

I usually throw a test copy of the production database, with documents, and a local replica of that database, call it test.nsf.

I compose on an .ntf/nsf, and when I've made my changes, throw a new blank .ntf to use to replace the design on my test production databases.  The new blank with no documents, will usually remove the echo fields, since there are no delete stubs.   And then I can see how I need to migrate changes to the production database, either by refreshing all the documents to add or remove form fields.

So I'm always updating the design with a fresh template and testing the effect of my changes on a copy of the full production database.  

Also, if I create tmp fields, I keep a naming convention so I can delete them when they're no longer needed.  Another convention that i picked up was if the application had many forms, the fields that were specific to a form started with the form abbreviation: prf_Name, etc.  Fields used consistently throughout were named normally, i.e. formType, formDescription, sendTo, CopyTo, etc.

I'm a neat freak in the sense that I like to see an organization of fields available.  

If you're emulating spreadsheets, then the added fields might be significant enough that you run out of field space and get the, "Dude! no more fields available..message."   :))  Yes, I've gotten the message TWICE. (quite awhile ago, though, and not my original db).
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 13
  • 7
  • 5
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now