Link to home
Start Free TrialLog in
Avatar of wzm
wzm

asked on

Lotus Notes Domino - dbProfile

Hi Experts,
 I hv one old program which I don't understand how does this dbprofile works. Please explain. Next please help me to solve this old codes, it is giving this error - "Server Error : Entry not found in Index" and here is the codes..

F :="names.nsf";
S :=@GetProfileField("(dbProfile)";"pAddressServer");

ENVIRONMENT DocType :=

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"ZPClaim" ; "Members"); @Name([CN];@UserName));
"Claims Requisition" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APMovex(Post Sales)" ; "Members"); @Name([CN];@UserName));
"Movex(Post Sales) Claims Requisition" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APMovex(GrpA)" ; "Members"); @Name([CN];@UserName));
"Movex(Pre Sales) Claims Requisition" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPSystem" ; "Members"); @Name([CN];@UserName));
"System Claims Requisition" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPEPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpE)" ;

@If( @Contains( @DbLookup( ""; S : F;"Groups";"APClmAccounts" ; "Members"); @Name([CN];@UserName));
"Accounts Claims Requisition" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APBI(GrpA)" ; "Members"); @Name([CN];@UserName));
"BI Claims Requisition(GrpA)" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APBI(GrpB)" ; "Members"); @Name([CN];@UserName));
"BI Claims Requisition(GrpB)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPAPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpA)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPBPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpB)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPCPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpC)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPDPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpD)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"LAPEPronto" ; "Members"); @Name([CN];@UserName));
"Pronto Claims Requisition (GrpE)" ;
@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APManagement" ; "Members"); @Name([CN];@UserName));
"Management Claims Requisition" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APMovex" ; "Members"); @Name([CN];@UserName));
"Movex Claims Requisition" ;


@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APSLRetail(GrpA)" ; "Members"); @Name([CN];@UserName));
"SLRetail Claims Requisition(GrpA)" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APSLRetail(GrpB)" ; "Members"); @Name([CN];@UserName));
"SLRetail Claims Requisition(GrpB)" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APBI(GrpA1)" ; "Members"); @Name([CN];@UserName));
"BI Claims Requisition (GrpA1)" ;

@If( @Contains( @DbLookup( ""; S : F ;"Groups";"APMovex(SE)" ; "Members"); @Name([CN];@UserName));
"Movex(SE) Claims Requisition" ;

Null
)))))))))))))))))));


@If( DocType = Null ;
@Prompt([Ok];"Reminder";"Please contact your administrator to ensure that you are assigned to your division group.");
@PostedCommand([Compose]; DocType))

Please help, Thank you.
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

The code lookups a searies of Groups from names.nsf to find the CommonName of the actual user as member in one of those groups. When one membership is found then is DocType set according to group name. For example when user is memeber in group ZPClaim then is DocType set to "Claims Requisition".
The variable F is the file name of names.nsf and the variable S is the server name where that names.nsf is located.
But that all works only when in the DB where upper @Formula is executed is a profile document is created.
Create a profile document once by executing this @Formula:
@SetProfileField(("(dbProfile)";"pAddressServer","YourDominoSrv");
Normaly do the developer place the upper @Formula that I have suggested in a Form that is opened to configure the application. search that configuration form or Document and adjust your server name information in that profile document.
Additional note: If you have a form with the name "(dbProfile)" then is that the profile setting document. That say: the form name is also the profile name when opened with command:
@Command( [EditProfileDocument] ; "(dbProfile)" );



Avatar of wzm
wzm

ASKER

Hi Zvonko,
 Can go to dummies level, I don't understand...
 and where should I place that code ? - "@SetProfileField(("(dbProfile)";"pAddressServer","YourDominoSrv");"
SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wzm

ASKER

yes.. as attached..
dbprofile-form.JPG
OK, then create an Agent with this one @Formula:
@Command( [EditProfileDocument] ; "(dbProfile)" );

And enter your Domino server name at field labeled: 4) Address database location

I assume the other DB and server fields need also to be filled but for membership lookup is Address server the first one needed.
Avatar of wzm

ASKER

1) create an Agent with @Formula:
@Command( [EditProfileDocument] ; "(dbProfile)" - done
2) Run the Agent from the Menu-Triggered command, and Key in the server name - done.

Wonderful!
Now should upper macro work. Check it.
Avatar of wzm

ASKER

pls help .. yaips nope still the same ...
Avatar of wzm

ASKER

I checked the Domino Directory from Address Book (names.nsf) there's no names in the Member List, could this be the problem? wonder why...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wzm

ASKER

No Solution