Dynamic Frameset Contents?

Greetings. I am a new Domino developer, and I am working on getting through the learning curve. I am having troubles currently with two things (seperate posts).

For this one, I would like to ask about dynamic frameset contents. When my users first access my database, I would like to query one of my views to see if they have already filled out their “user profile” form and submitted it to the database. If they have, I want to show a “Welcome” page in the frameset. If not, I want to show the “User Info” form in the frameset. I have taken a stab at this, but I am not sure I did it correctly. Here is what I have:

Frame Properties > Basics:

Type: Named Element

Value: Computed

Forumula for kind of named element:

@If(

 @DbLookup("" : "nocache" ; "" : "WORS2K5.nsf" ; "AllUsersByName"; @Name([CN]; @UserName) ; 1) = "";

 "Form";

 "Page"

)

Formula for database:

Formula for name of named element:

@If(

 @DbLookup("" : "nocache" ; "" : "WORS2K5.nsf" ; "AllUsersByName"; @Name([CN]; @UserName) ; 1) = "";

 "UserInfo";

 "Homepage"

)

If someone could kindly tell me if I have the right of this, or if I am way off base, it would be much appreciated. Thank you!

Chris Ivey

Verizon Data Services

Enterprise Network Support Services

Network Management Tools Group

Subject: Dynamic Frameset Contents?

@DbLookup will either return the user’s common name (the value in column 1) or an error value, so testing for “” will always be false. Test using @IsError instead.

Subject: RE: Dynamic Frameset Contents?

Awesome! Stan, thank you very much. I changed my code to use @IsError, and sure enough it worked just like it was supposed to. Thanks again!

Chris Ivey

Verizon Data Services

Enterprise Network Support Services

Network Management Tools Group