@DbLookup not working

I am using the below code and it is not looking up the department number from the username for my helpdesk database. I am new to development since version5, so your help would be greatly appreciated.

dept =@DbLookup( “” : “” ; “” : “names.nsf” ; “($VIMPeople)” ; FromD; “Department”;1);

@If(@IsNewDoc & !@IsDocBeingSaved & !@IsDocBeingRecalculated ; dept ; Department)

Subject: @DbLookup not working

Guess the first thing to check would be to pur in @name([abbreviate];FromD) to assure the name is in the right format- and what purpose in the “1” doing?

Subject: RE: @DbLookup not working

I did the abbreviate but now I get the following error:

Field: Department Incorrect Datatype for database function

Subject: @DbLookup not working

You’re missing the colon in this… dept := @DbLookup(…-rich

Subject: RE: @DbLookup not working

Thanks, I put the COLON in but still keep getting error

Subject: @DbLookup not working

I would leave the 1 off of the end, and make sure that the FromD field contains the username in abbreviated format (username/org).

Subject: @DbLookup not working

assuming FromD is a Notes user name why not use

@NameLookup ( NOSEARCHING]; FromD; “Department”)

Subject: RE: @DbLookup not working

Paul,

What does the @NameLookup function do? I couldn’t find it in the NotesHelp. Is it a new function to version 7? Does it lookup in the current database only? In my form, i’m trying to lookup in the names.nsf

thanks,

sadia

Subject: RE: @DbLookup not working

it is new to release 5. it does a lookup to names.nsf

Subject: RE: @DbLookup not working

Thanks Paul, that worked very well! I really appreciate your help!