« Any tips for quick performance analysis on Domino server? | Main| Anybody knows what kind of presenter-tool that has a moving flashlight cursor? »

How I fixed a problematic view with columns that did not update the underlaying viewdata anymore

Tags: Lotus Notes LotusScript DXL
Have you ever had a database where the view-data seems to get stuck? You have an initial design and when you drag the columns around, the underlaying data won't reflect the changes? Hey, you can't even add new columns to the view anymore? ncompact -D, deleting the cache.ndk, reverting the database down from Designer 8.5 to 7.02, reverting the ODS ... and still those b***stard columns won't obey your commands .... Read on if you want to see how I finally got it solved!
The initial view looks like this;

A picture named M2

Note the column sequence, and especially the view-data shown. I have a sort column, a Language, a Description and a Tech. Translator. Now, below you see the same view after I have dragged around the columns and pressed Refresh again;

A picture named M3
Note how the first column now has the Language-column header, color and formula - but still the data shows the sort-column data. The sort column header (the first one in the first screenshot) has been moved to column three and now shows the Description ....

If you want to see this in action, head over to this document, where you also can download a small copy of my database in question,. with mere 3 documents and 2 views. Default access is manager and encryption if off so you should be able to see the effect...

Now, first I thought this was a problem specific to Domino Designer on Eclipse, as this was the first platform I discovered the problem. However, it didn't help to edit the database in neither Designer 8.0.2 or 7.0.2. Perhaps the Designer 8.5 introduced  the problem, I don't know ...

In the super Partnerworld Forum 2009, I posted a similar post as this, and got good advice and trips to try out. Amongst them was to delete the Cache.Ndk file, run NCOMPACT -D on the database, Fix the programmatic name on the column etc etc. Unfortunately none of this helped.

Also recreating the view from scratch was suggested, and that actually works. But does it solve  the problem? I don't think so ...

My biggest worry is that many more views might have caught this "disease" .... So I'd better hope for a fix ....

Meet DXL!

Since recreating the view from scratch works. I though that maybe I could create the view "from scratch" with DXL. This of course means that I export the existing design first, delete the problematic view from the database, and then reimport the DXL.... and this also works!!!!! Jiiiha!

The steps to do this;
  1. Export the view(s) you want to recreate. You do this from the Designer's menu. Save to a file you remember!

    A picture named M4
  • Delete the real view in the database. Perhaps make a backup first right Whatever, the view doesn't work anymore anyway ... scrap it!
  • Now, the reimport of the DXL file cannot (for some strange reason) be done directly in the Designer, so you have to make a small LotusScript agent. Make the target equal to NONE on the agent;

    A picture named M5

    Nothing special in the DXL code, maybe but for the import options set just before the final Import-call. These settings tells NotesDXLImporter that the view needn't be present in order to copy, and neither do I want to update the database properties. Head over to
    this download, if you want the LSS file.
    That is it! You may want to quit your database both from the Designer and the Notes client in order to let the Designer and Notes clients pick up the change correctly.
  • Comments

    Gravatar Image1 - Blindingly obvious (and years late) but I'll ask anyway, did you check the programmable column name on the beanie tab? Usually copy/pasting and reordering calculated columns can screw with the column names. Doesn't affect named field columns, only calculated columns.

    Post A Comment