Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help in Notes Formulas - v4.6x 1

Status
Not open for further replies.

hm1234

IS-IT--Management
Dec 7, 2002
5
0
0
JP
Dear All,
I am new to Application Development and am trying to modify an existing database created by some other developer. I need a Notes formula to implement the below requirement. I think it is pretty straightforward to use @if command, but I am not able to get it. Please help. Thanks in advance

There are 2 Roles - [RoleA] and [RoleB]
There are 4 views - view1, view2, view3, view4

If a user is a member of both [RoleA] and [RoleB], display view1.
If a user is a member of [RoleA], display view2
If a user is a member of [RoleB], display view3
If a user is not a member of any [Roles], display view4
 
Hi,
@if works like '@if(condition1; action1; condition2; action2;...;else-action).
if you use the @userroles function together with @contains and queue the conditions in the right order, this should not be too much of a problem. If it is, look up the sysntax for the @formulas in the designer help.
 
Try this :
Code:
WkRole1Check:=@if(@contains(@userroles;"[RoleA]");1;0);
WkRole2Check:=@if(@contains(@userroles;"[RoleB]");1;0);
WkRoleBoth:=WkRole1Check+WkRole2Check;
@if(
WkRoleBoth=2;@command([OpenView];"view1");
WkRole1Check=1;@command([OpenView];"view2");
WkRole2Check=1;@command([OpenView];"view3");
"view4")
 
pretty spiffy pascal! i'm always impressed by your lotus codes & formulas! have a star on me! Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top