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.
Lotus IBM

Avatar of undefined
Last Comment
wzm

8/22/2022 - Mon
Zvonko

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");
Zvonko

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)" );



wzm

ASKER
Hi Zvonko,
 Can go to dummies level, I don't understand...
 and where should I place that code ? - "@SetProfileField(("(dbProfile)";"pAddressServer","YourDominoSrv");"
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
SOLUTION
Zvonko

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
wzm

ASKER
yes.. as attached..
dbprofile-form.JPG
Zvonko

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.
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.

⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Zvonko

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

ASKER
pls help .. yaips nope still the same ...
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...
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
wzm

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
wzm

ASKER
No Solution