Document has been modified or corrupted since signed! (data)

114 views Asked by At

I'm working in HCL Notes application. I have developed a summary view to show calculated figures to the user. Then the user clicks one of the action buttons and I open a detailed view, but for that view I setup Selection Formula on the fly so that it shows the records filtered specific to that button conditions. It was working almost fine for a few days, but now most of the time it shows some previously shown (filtered) data no matter what button the user has clicked. Means it doesn't set the Selection Formula of the view and shows the view with the old formula and it won't get back to normal condition even if they restart Notes application.

When the user is stuck in this particular condition, and they peep through the status bar it shows this message:

Document has been modified or corrupted since signed! (data).

The necessary code-snippet is as below:

*Set dtlView = db.GetView("Report_Dtl")

dtlView.SelectionFormula =formula

Call dtlView.Refresh()*

where formula is the dynamically built formula. Looks like the line

dtlView.SelectionFormula =formula

is unable to update the selection formula and then the line below generates the above error message:

Call uidb.OpenView(dtlView.Name,,False, False)

Please help!

Thanks

1

There are 1 answers

3
Tode On

For "on the fly" modification of the view selection formula your user need "Designer"- access to the database, and that is never a good idea. The help document to the function you are using is explicitly stating that this is not a good idea (emphasise of mine):

This is not a good way to display a selected set of documents for a specific user. When you use this property to change the view selection, it applies to all users of the view.

There are problems with using this method to make a view display a new selection of documents for an end user:

Do not give end-users Designer access to an application.

If it is a shared view, users will interfere with each other's searches.

The NotesĀ® client caches design information, and there's no way to tell it to update its cache (except for outlines). Exiting and re-entering the application usually works, but it's hard to programmatically ensure the user exited the application entirely.

In addition the modification of the view selection formula can break the signature of the design element and then other errors occur.

Better use another approach:

  • Use a Folder for every user and put the selected documents in there (after doing a NotesDatabase.Search with the formula
  • Use a separate view for every user and let a server agent manipulate its selection formula with a user that has access.

For having a separate view / folder for every user you could use "Shared, Private on first use"- views (they are not easy to maintain), or any process that generates them and is able to assign every view to the users they belong to... in both cases this needs some effort, but at least it will work.