Launch DB to Form in Client

I am trying to get my database to launch to a Form rather than a navigator, frameset, etc … when the db is opened by a notes client. I managed to do this when the database is opened in a web browser. I created a navigator template and used an HTML redirect. I don’t know how to do this in the client however.

I have an embedded view on the form I wish to launch to. I can’t use a page because I have some dropdowns and other filtering options which modify the view based on user selections.

I’m not very familar with lotus script, so if the solution is there, please try to be detailed.

Thank you.

Subject: Launch DB to Form in Client

Thank you both for the help. I never new you could use javascript to redirect the client like that. That’s pretty cool. I’ll try both and see which works for me.

Subject: Launch DB to Form in Client

It is possible, I struggled with this quite a bit until I found a solution.It really is a bit complicated so I’ll do my best to lead you through it all.

  1. You will need a frameset. Don’t worry, we will only use it for the start-up phase and you won’t need it afterwards.

So, create a simple frameset with 2 frames.

Name the frames ‘left’ and ‘right’ for simplicity.

  1. Create a blank page for your left frame, call it ‘pgBlank’ and set you left frame to load that page.

  2. Create a new form for your right frame.

Call it ‘(redirect)’.

Create a hidden text field, editable, name it ‘SaveOptions’ and give it default value of “0”. (alphanumeric zero)

Create another hidden text field, computed, name it ‘redirectto’ and give it the the following value:

“notes:///” + @ReplaceSubstring(@ReplicaID; “:”; “”) + “/thenameofyourform?openform”

You should of course replace ‘thenameofyourform’ with the name of the form you want to load.

In the onLoad event of the form, specify ‘Client’, ‘JavaScript’ and this value: doRedirect()

In the JS Header part of the form, specify 'Client, ‘JavaScript’ and this code:

function doRedirect() {

// Immediately redirect to the default view.

top.location.href = document.forms[0].redirectto.value;

}

OK, now set your right frame to use this form.

In the database properties (in Designer), set the database to open your new frameset when opened.

What will happen is this:

  1. The database opens and loads the frameset.

  2. Your (redirect) form will immediately redirect to the form you really want to load, and it will do it in the ‘top’ frame, thereby overriding the frameset.

Voila.

Hope this helps.

ken@noteshound.com

Subject: RE: Launch DB to Form in Client

This seems to work well. I have this issue though. When the frameset loads it displays a message that says “cannot execute the specified command.” then it completes the redirect.

Subject: Launch DB to Form in Client

I think the below solution will work.

  1. Create a document with that form

  2. Make a doclink of that document

  3. Compose ‘About Database’ design element

  4. Paste the doclink in the ‘About Database’ document (The doclink must be the first doclink)

  5. Open database Properties and select ‘Launch first doclink in About Database’ for the option ‘when opened in Notes Client’.

HTH

Adi

Subject: RE: Launch DB to Form in Client

Thats pretty good Adi. The only problem is that it asks if the user wants to save even when I insert the SaveOptions “0” field.