Is there a way to program view column headings in Notes DB v5 or above? I currently have a heading called "WK1." I would like this, though, to show this week's Monday date each time the view is accessed. The column is a totals column, so I don't want it as a doc in the view.
There's no way to write a "column heading formula." However, in Notes 6, the NotesViewColumn class lets you assign the Title property. So, you could write an agent that executes weekly (say on Sunday) and updates the title to the value you want for that week. Something like this:
Set view = db.GetView("viewName") Set column = view.Columns(0) column.Title = Cstr(Today+1) view.Refresh ' so that the first person to open the view will not have
to wait for it to be re-indexed.
[<SCRIPT>dynamicColumnHeader ( )</SCRIPT>]
The dynamicColumnHeader function would calculate the desired text and use document.write to add it to the page.
Do you have comments on this Ask the Expert Q&A? Let us know.