Use ComposeDocument to compose on either local or server?

Hi, here’s my question:

I have a form, and in it I have a button that, when clicked, should compose a new UI document in another database.

I want it to do the compose on the local copy of that DB (if they have one), and the server copy if they do not. How can I do this? My current code is:

Set commentuidoc = ws.ComposeDocument(“D01DBR02”, “e_dir\elsissues.nsf”, “Comment Doc”)

But that, obviously, only uses the server copy.

We can assume that the users already have the icon for elsissues.nsf on their workspace.

Thanks!

Ben

Subject: Use ComposeDocument to compose on either local or server?

You need to check if they have the database in their local machine.This can easily be done using set localdb = session.getdatabase(“”,“elsissues.nsf”).And now you can use “if” condition to check if the db has something in it.If the db has something then “Set commentuidoc = ws.ComposeDocument(”“, “e_dir\elsissues.nsf”, “Comment Doc”)” or else “Set commentuidoc = ws.ComposeDocument(“D01DBR02”, “e_dir\elsissues.nsf”, “Comment Doc”)”.

Subject: Use ComposeDocument to compose on either local or server?

Benm

Have you thoguht of creating a dB instance to the local dB, and then if the .isOpen is set, thenyou know they have a local copy, it not compose to the server?

John