×
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

Can 2 columns in a view be combined in a @Unique

Can 2 columns in a view be combined in a @Unique

Can 2 columns in a view be combined in a @Unique

(OP)
I am creating a form to pull information from a view.  The first column is a Last Name of person and the second column is "First Name" of person.  In the form is there a formula to combine these columns so the user can pull the full name of the particular person in one drop down list?

RE: Can 2 columns in a view be combined in a @Unique

Probably the easiest way to do this is to create a lookup view (you could make it a hidden view) that has one column with the formula firstname +" "+ lastname. This column would then display the full mane of the person.

In the form you would use @DBColumn to populate the listbox with the names from the view as follows.

@DbColumn( class : "NoCache" ; server : database ; view ; columnNumber ).

This formula will return all the information in the specified column.

I always use the replica ID in the server and database positions in this formula so if the user is working on a local replica it will check this replica first instead of giving "cannot find path to server" if the server name and database are hard coded into the formula.

I find lookup views very handy in my databases as it make the form perform a little better if it is not making addidtional calculations like doing one lookup for the firstname and then looking up the lastname and then adding them together.

Hope this helps!

RE: Can 2 columns in a view be combined in a @Unique

By the way..... if you don't want and names repeated in the list you would need to use @Unique around the @DBColumn formula. ie

@Unique(@DbColumn( class : "NoCache" ; server : database ; view ; columnNumber ))

Hope this helps!

RE: Can 2 columns in a view be combined in a @Unique

(OP)
Thanks ABOzIT.   It worked.

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!

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