How to refresh value of computed text or field

I have a tip of the day in a company-wide welcome page that doesn’t refresh unless I put it into edit mode and resave it (what user is gonna do that?)

the tip is in a document in a view and is called via an @DBColumn

I tried both a backend refresh agent (code below) scheduled when docs are created or modified as well as computed text, nothing can get this thing to refresh automatically.

There has to be a way to get a computed/computed for display field to auto refresh when the doc is loaded, no?

any ideas?

TIA,

-MC

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim Paynum As String



Set db = s.CurrentDatabase

Set view = db.GetView("(homel)")

Set doc = view.GetFirstDocument



While Not (doc Is Nothing)

	x = x + 1

	Print "Now Updating Document # " + Str(x) ' Prints the document Number that is being updated

	returnFlag = doc.ComputeWithForm(False,True)

	If (returnFlag) Then

		Call doc.Save(True,False)

	End If

	Set doc = view.GetNextDocument(doc)

Wend

End Sub

Subject: how to refresh value of computed text or field

I think a ComputedForDisplay field or ComputedText should always refresh when you view it - no actions are necessary. A Computed field will not unless you do edit mode and refresh or do it in the back-end.

I suspect you had the field as Computed, then changed it to CFD. The problem here is that the field’s value is stuck in the backend document. Try to change the CFD field name or remove the old NotesItem in the document.

If this doesn’t help please post the formula for your CFD field, rather than the backend refresh agent.

Subject: RE: how to refresh value of computed text or field

inserted a new field, computed for display, with the formula: @DbColumn(“” : “”; “” : “”; “(tipoftheday)”; 1)

the first time it didn’t work, so I shut down the client, deleted cache.ndk, relaunched the client and it worked.

The second time it worked without having to do all that

thanks a lot,

-MC