I am developing a system that comprises multiple databases, some of which will be optional modules. The main database has a configuration profile document that contains fields that indicate which optional modules (other databases) are available, & their Replica IDs.
When accessing the other DBs in code, I can get the info from the profile document, & if available, open the other database - not a problem. However, how can I make Outline Entries link to Views in the database mentioned in the profile document? I’ve tried to get the Outline Entry to call a LotusScript Agent, but I can’t even get the Agent to open the View in the other Database in the frameset, like the other Views would.
The only thing I can do is hard-code the Views in the other database in the Outline Entries, but this is no good really, as I can hardly give the template to a client, then tell them to go into the design & point the Outline Entries manually.
Anyone got any ideas?
Thanks,
Paul Cutcliffe
eNet IT Solutions Ltd, UK
+44 (0)1323 640500
Subject: D’oh! Notes R6 already does exactly what I want, I just didn’t know!
You can have a computed Named Element!
Brilliant!
Subject: Outline Entries - how can an Entry open a view in another database, computed at run time?
Hiweb or notes-client? I can open a database view from profiledoc in notes client:
- Make sure the outline entry is based on type action. Use a formula to start an agent:
@Command( [RunAgent] ; “MyDBAgent”)
-
Agent-Code
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim strDB, strServer, strView As String
Dim view As NotesView
Dim profiledoc As NotesDocument
Set db = session.CurrentDatabase
Set profiledoc = db.GetProfileDocument(“ProfileName”) 'depends sometimes on Username?
strDB = profiledoc.getFieldWithPathName(0)
strServer = profiledoc.getFieldWithServerName(0)
strView = profiledoc.ggetFieldWithViewName(0)
Call ws.OpenDatabase( strServer,strDB, strView) 'See Help for “OpenDatabase” - Options
Hope this is a little help
Subject: Thanks very much, BUT…
… it opens the View in a new window, whereas all the other Outline Entries open up within the current frameset.
Anyone have any ideas?