Hi There
I have to try this again.
We have just upgraded the Domino server to R.6.5.2. Since the upgrade we have some problems in different databases. I have tried to troubleshoot, but this is not just simple issues. I have tried a lot, but the problem still occures.
My database holds two fields and some code.
In my postopen for the form, I set the value for these two fields. The values are displayed correctly.
The fields also holds a default value like:
@if(field1=“”;@Today;field1).
When refreshed, the fields looses their value and the default - @Today - is inserted.
This has worked before the upgrade.
To allove the user to cancel, a save is not a possible solution.
Charlotte
Subject: RE: Refresh and default values
The Postopen is the wrong place to do this assignment. The code that creates the document from the doubleclick event of the view should do it.
Alternately, if for some reason that doesn’t meet your needs, try assigning the back-end fields directly:
Set doc = source.document
doc.FromDate = StartDateTime
doc.ToDate = StartDateTime
Subject: RE: Refresh and default values
Neiter works.
Setting the values in the compose-event - in the action that users uses to make to document has no other effect that it has now.
Using back-end only works when saving the document, and as I wrote in the maintask, this is not an option.
Subject: RE: Refresh and default values
Well, it’s funny, because the calendar in the Notes mail file works, and it has a default value in the fields. Maybe you should look at how it’s done there. I think there has to be something else in your form adjusting the values of those fields.
Subject: RE: Refresh and default values
Yeah, I have thought about the calender to, and I have looked at the diffences but there is none. Other than one thing, and that is exactly what is the problem - I have a theird field that holds some code. In this code there is nothing related to the two other fields, but…there is a refresh.
And it is this refresh that causes the two fields to looses their value.
But: This has never happend before in this application, and it has been running for over 2 years now. And there has been no design changes for a long time.
So that is why I think, that Lotus has implemented an refresh-bug in R.6.5.2.
Subject: RE: Refresh and default values
All right – if there’s a refresh associated with a field, I assume it’s a keyword field that does refresh on keyword change. So the form doesn’t refresh until you change that field. I suggest you try not changing the keyword field, but instead, press F9. Does that also reset your date fields?
Now try creating a new calendar entry by double-clicking in your Notes mail calendar. Press F9. Do any date fields change? They don’t when I try it.
If your form changes date field values on F9 and the Notes calendar doesn’t, that shows that there’s something about your form that you could correct to correct the problem.
I’m not denying that something might have changed between Notes versions. But it might not be what you think it is. Possibly there’s some code executing during the refresh that’s working differently than in before. Is there anything in the Postrecalc event, for instance?
Subject: RE: Refresh and default values
Yea, I get what you are saying, but…
I have tried make a hole new form only with the 2 fields and only the code, I really need, and there is nothing I can do to make it work. As you say, the calendar is fine, but this is not.
Pressing f9 makes the same “error” as changing the field, but there is no other code than the one setting the fields in the postopen.
There is no PostRecalc.
There is no other code on the fields than the default value. - And why is the default suddenly used while refreshed?
At this moment I have copied the code to a testform only containing the two fields, the Queryopen and postopen, adn nothing else. The code in queryopen and postopen is the code setting the value of the fields, wich is working fine.
Still this does not solve any problems.
I really hope, you can help.
Charlotte
Subject: RE: Refresh and default values
yet another comment:
It is the default that couses the problem. I’m am using scriptcode to set the value of the uidoc by using
Call Source.FieldSetText(“FromDate”, StartDateTime)
The fields the holdes the default:
@If(FromDate=“”;@Today;FromDate)
This is the part, that has change. Before when using uidoc.Field SetText, the value were set in the field. Now it seem that it is only set temperarly.
Do you understand??
Subject: RE: Refresh and default values
I confirm that there is a problem assigning date/time fields in Postopen using FieldSetText. SPR # AGUD632PZF
I found no problem assigning the fields using the NotesDocument methods, however, and I suggest you try that.
Assigning the fields in the RegionDoubleClick event also worked just fine.
I’m done answering in this thread.
Subject: RE: Refresh and default values
Thank you a lot, Andre
I will try to get it working.