• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Selective Launch of Database

I have a database that it set to launch the first doclink in the "About" database when launched.  Can I change it so it launches the first doclink if true, else launch the second doclink?

I have tried hidding it if not true, but it didn't seem to work.
0
DawG25
Asked:
DawG25
1 Solution
 
Bozzie4Commented:
No you can't, but you can program this behaviour somewhere else :

- use a frameset, and compute the content of the fram
- use the "Launch navigator", and choose aPage there - with some computation

cheers,

Tom
0
 
DawG25Author Commented:
is there a way to launch the new page from the header???

This is done in PHP like so: header("Location: page.html");

It launches instantly, can this be done in domino?
0
 
Bozzie4Commented:
Wait, is this for the Notes Client or is this for the web ?

On the web, you can also use a navigator, with a $$NavigatorDefault form ...

Tom
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
DawG25Author Commented:
Web

Can I use @SetHTTPHeader?
0
 
Bozzie4Commented:
Yes, but I don't think Domino supports the redirect header attribute (which I suppose, does the php solution) - I tried that in the past, and if I recall correctly, it won't work.

Luckily, it's not necessary - just don't try to open a document directly and then try to redirect/open something else (because you'll get stuck) .  Open a Form instead (or an agent, or whatever), and do the processing in the form or agent - this is a lot easier to handle in Notes

cheers,

Tom
0
 
p_parthaCommented:
In the HTML HEad of a page , you can mix javascript and formula, so in the database properties make it open a page on start and in the HTML Head use a dblookup to check for the condition, if ur conditon is true, then redirect , soemthing in this lines:


@if(<yourconditon>="true";"<script>location.href='http://www.google.com'</script>";"<script>location.href='http://www.rediff.com'</script>")

- Partha
0
 
qwaleteeCommented:
Partha's idea, but a little easier to manage:

condition := @Username = "Anonymous"; REM "Example condition that evaluates to Boolean true/false, or 1/0";
location_on_true := "http://www.google.com";
location_on_false := "http://www.yahoo.com";
@If(
    condition;
        location_on_true;
      location_on_false
  )

Or, for Bozzie's idea:
    Create a Notes page (or form or view) named LAUNCH_TRUE with your content for the true condition
    Create a Notes page (or form or view) named LAUNCH_FALSE with your content for the false condition
    Create a Notes frameset named LAUNCH
        Notes will ask you how many frames in frameset, choose 2
        Click on the narrower frame, then click on the Delete Frame button
        You now have a single frame frameset
    Optionally: Open frameset properties, set default target to be _top, so the frameset is gone once user clicks a link
    Open frame properties for the single frame
    On the first tab, click the "@" button to enter a formula for your content
    Formula should be:
condition := @Username = "Anonymous";
@If(
    condition;
        "LAUNCH_TRUE";
      "LAUNCH_TRUE"
  )

0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now