JoeLitton.net | R6: Embed multiple views from different databases
PermaLinkR6: Embed multiple views from different databases
posted Thursday 24th, March 2005
 



I'm posting this so that I can easily find the answer if I forget later! I'm working on a form in the Notes client, and this form needs to include multiple embedded views, with the views being pulled from various different external Notes databases. I was having a heck of a time figuring out how to do this. I knew that I had done this many times in the past, but today I was unable to get the database and view that I needed.

The solution? With the Client and Designer programs running, drag the icon of the desired database to the Designer client (to the title of the Designer window down on the Windows taskbar). In my case, I didn't have designer rights to the needed database, but the database was now listed in my Designer client. Once that was done, I could open the form on which I was working, click to embed a view, and now in the "Insert embedded view" properties box I was finally able to select the database I needed. It appears that if one wishes to embed a view from an external database, the database must be listed within one's Designer client (with a few exceptions, like one's mail file, personal NAB, etc.). This may be documented somewhere in the Designer Help, but I sure couldn't find it.

I apparently had not had a problem with this in the past because the other times when I needed to embed a view from a different database, I happened to already have that other database within my Recent Databases folder inside of Designer.

Whew! Time for a brief break :-)

Comments :
 
 

1. Posted by Curt Carlson09/09/2007 08:42 PM



Ahh...I remember how excited I was when R6 came out and you could embed views from other databases! I work on a large application that consists of 11 different .nsf files so we use this feature quite a bit. One of the challenges that we faced was how to move our design through our three different environments and still have it work. We have a set of design databases where we do our development, a set of QA database where we do QA testing, and lastly the production databases. The challenge was to have the embedded views dynamically change which database they point to as the design moves from Design to QA and then production. Presently we are doing this with a separate subform for each environment and then loading the computed subform based on the environment. Needless to say this is a bit messy but we have been unable to come up with another solution that allows us to cut templates from design to refresh QA or from QA to refresh production and still have the embedded views pointing to the correct database. I would love to hear any alternatives to this method as having to create three subforms every time you want to use an embedded view from another database is a real drag.




2. Posted by Joe Litton - website09/09/2007 08:42 PM



Curt, you're ahead of me, man. I've been just "brute-forcing" it ...manually change where the views point when I migrate the db to a different environment. I WISH there was a way to do this more cleanly. Your method, while it may seem kludgy to you, is better than manually changing things if you've got a lot of views and databases!




3. Posted by Christopher Byrne - website09/09/2007 08:42 PM



Hmm, a topic to write about. This is definitely a challenge if you are working in an environment with a strong life-cycle development culture and string controls.




4. Posted by Jamie Haynes - website09/09/2007 08:42 PM



I have the EXACT same problem. I like the subform idea, but you would think that Lotus would just let you reference a replica id or something. Please let me know if any of you come across a better solution. jlh




5. Posted by Thierry Fine09/09/2007 08:42 PM



A other problem in the same category :
I embed a view from a other database in a form. This other database is replicated on 3 servers. When I open a document with this form, the embedded view displays correctly, but I can't select the server where it comes from. Sometimes, it is very long to display, because it chooses a far server.
Do you know how I can select this server ?
I would like to open the form and the embedded view on the same server.
That seems easy, but I can't find where is this parameter. It does not depend of the user, because the view comes from 2 different servers for me, on 2 workstations.
I use the release 6.5.4
Thanks for yours answers
And sorry for my spelling mistakes, but I'm french !




6. Posted by Joe Litton - website09/09/2007 08:42 PM



Thierry, Ce n'est pas un problème si vous êtes français - je suis américain, et je sais probablement 200 mots en français ...and je ne parle jamais correctement! Mais j'aime la France et j'espère visiter encore. Alors...back to english ...
I have not tried this, but I am wondering if it would be possible to open the desired replica before opening the form. Perhaps you could put some code in the database queryOpen event to open the other database on the same server ...I think this *might* put that replica on the top of stacked replicas on the Workspace, and then when the form is opened, it might open the embedded view from the same server. I do not know. I will try testing this later. Please let me know if you test this.




7. Posted by Thierry09/09/2007 08:42 PM



Hi Joe. Your french is very good, and you will be welcome in France !
In my workspace, my icons are not usually stacked.
But I had tested your idea, and indeed, if I stack my replica icons, the server for the embedded view is the replica on the top. So, it's a good way to select the server.
But I'm sure that some users does not want to stack their icons, because they often move, and it's more easy for us to have a page on the workspace per site (one site = one server). And in this case, I cannot found the rule used by Notes to choose the server. I will have to explain them that they have to stack their icons.
I don't know if you have tested the Workplace choice as welcome page, but it's the same problem. And in this case, if you have no connection to the network, you have a beautiful NSD screen. It's a pity, because it's a very nice welcome page, and a efficient way to do collaboration.