I have a Notes document with a computed date field called ‘StartDate’. The value for StartDate was originally 12/24/2005. StartDate was then updated through a form action to 12/25/2005. (I’ve verified StartDate’s value and that it’s in a date/time format by checking the document properties.)
The problem that I’ve encountered is that a column in a view continues to display the original value for StartDate (12/24/2005) even though the view has been refreshed and the column only references the field name. I’d appreciate any ideas on why view column does not display the updated value for StartDate.
Thanks.
Subject: View Column Does Not Display Correct Field Value
Just an additional note to my original entry …
Although StartDate is displayed as 12/25/2005 when the document is opened and the document properties shows that StartDate has a value of 12/25/2005, the Notes Designer debugger indicates that StartDate still has it’s original value of 12/24/2005.
Thanks.
Subject: View Column Does Not Display Correct Field Value
Check the programmatic names of your view columns. This can be a particular problem if you ever copy/paste a view column. If the columns use the fields directly, no sweat, but if you use, say, @Date(FieldName), the column programmatic name will be something like “$3”. If there is another column in the view with the same programmatic name, the first column wins, and that value computed in that column will be displayed in all subsequent columns with the same programmatic name. Never let the dollar name stand – give every computed column a meaningful programmatic name (making sure it doesn’t duplicate a field name).
Subject: RE: View Column Does Not Display Correct Field Value
To test the possibility that the programmatic name in the view column might be causing an incorrect value to be displayed in the column containing StartDate, I created a new database, added the form, and created a new view with only one column for StartDate. I then copied into it the document - the result is that the original StartDate (12/24/2005) is still being displayed. The fact that the original StartDate appears in the Notes Designer debugger suggests that this is not a view issue. Thanks for the suggestion though.
Subject: RE: View Column Does Not Display Correct Field Value
Sorry – I posted my reply before you posted your addendum/clarification.
If the debugger and the view are both sure that the old value is the real value, then I’d suggest that your new value is not, in fact, being saved into the document. Are you setting the value using a formula while the document is in Read Mode?
Subject: RE: View Column Does Not Display Correct Field Value
The document with the StartDate field is being updated by a parent document through a form action. (The child document does not inherit values from the parent.) Here’s the sequence:
-
Parent creates child which opens in edit mode. Parent passes date of 12/24/2005.
-
After both parent and child are saved, the parent is opened and a form action looks-up the child and passes to it a date of 12/25/2005 without the child being opened.
The net of this is that the child displays the new date (12/25/2005) when it’s opened as well as in its document properties. However, the debugger and the view column (which is defined by the field name) continue to reference the original date (12/24/2005).
Thanks again.
Subject: RE: View Column Does Not Display Correct Field Value
Is the field computed or editable? Are you certain you’re using the same field everywhere?
Subject: RE: View Column Does Not Display Correct Field Value
The StartDate field on the child is computed but it only has the formula ‘StartDate’. (The parent also has a StartDate field although this is computed from fields with the day, month, and year.)
In the scenario I described, the parent StartDate field is updated, then the parent’s form action (LotusScript) does the following:
-
Saves the parent (both the uidoc and back-end doc.)
-
Locates the child through a look-up at which time the parent’s updated StartDate is copied to the child StartDate. The child doc is then saved.
Thanks.