×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

@DbColumn

@DbColumn

@DbColumn

(OP)
Hi


I have a form named 'NEWCALL' which has 4 fields called usrname(which is a combo box), room, telnumber and fullname on it.

I have a view called 'users' which contains 4 columns, usrname,room,telnumber and full name.  (" Basically the information stored in the view is a list of computer users at an organisation")(*this view gets its values from a form called "add_new_user")

On the NEWCALL form i would like to be able to selct the usrname from a drop down list, which will then automatically fill in the room,telnumber and fullname fields for that user.

I have this formula in the usrname field on the NEWCALL form " @DbColumn("":"";"":"";"users";1) ".  This looks at the first column in the users view and gives me a list of usrnames".

So what i would like to happen is for the rest of the fileds to be automatically filled in when i select one of the users.

Can this be done?, or am i way of the mark?

Hope that makes sense, I can send my database if it doesn't.
Any help or advice would be great as this is for my HNC project.

many thanks

RE: @DbColumn

If you Use @dblookup for each field in your NEWCALL form ?


@DbLookup("":"";"":"";"the name of the view to search in (users)";The string you want to find in the first sorted column (?) (the user name)"; The field you want to bing back(room))

RE: @DbColumn

(OP)
I have just tried to use the dblookup but i get this error: "field: 'field name': Entry not found in index or view's index not built "

any ideas what this means?

many thanks

RE: @DbColumn

(OP)
Think i worked it out, i was using the field name which dosnt do anything, but if i use the column number it worked.

Does any one know the difference between using the field name or column number?

@DbLookup("":"";"":"";"users";user_name;full) - this didnt work.

@DbLookup("":"";"":"";"users";user_name;2) - this did work.

RE: @DbColumn

You need to put the field name in quotes, i.e.

@DbLookup("":"";"":"";"users";user_name;"full")

It also helps a lot when you have a default view defined in your database, and having a default form is not a bad idea either. Sometimes, the absence of a default form/view can explain errors or inconsistant results with @Db formulas.

Pascal.

RE: @DbColumn

(OP)
Many thanks, Working great

RE: @DbColumn

(OP)
Oh one more thing.  When i add a new entry into the view i have to close lotus then reopen it before it appears in my field( the dbcolumn field) on my form. Is there anything i can do to make the field see the new entry in the view without having to close and reopen notes?

I do have refreash on keyword change and refresh of choices on document selected on the field.

Again thanks for all your help

RE: @DbColumn

The answer in is your friendly Designer Help db, which you really should consult regularly :

@DbLookup("":"NOCACHE";"":"";"users";user_name;"full")

Or, if you make changes often, then use RECACHE instead of NOCACHE.

Pascal.

RE: @DbColumn

(OP)
Many Thanks again pascal.

It helps if you know what your looking for in the designer help db.

Thanks

RE: @DbColumn

It does, but here you only need to look up the syntaxe for @dblookup .

Pascal.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close