Ask Your Question

Multi field list in drop down list [closed]

asked 2016-08-04 22:07:21 +0100

wildblue gravatar image

Greetings and thank you in advance for you time in reviewing this issue. Not sure of the verbiage to explain it exactly, but hopefully this will work. I am using

Ubuntu 16.04 LTS Libre Office Version: Build ID: 1:5.1.4-0ubuntu1

Am pretty happy with the database I am designing, but looking to make it better. One function of the db is a correspondence log. In the drop down list to display recipients of correspondence, currently lists only the last name. This works, unless their are two recipients with the same last name.

How can I, is there a way to have the drop down list display both the First and Last names of recipients to ensure, and cause it to be easier for users to select the correct recipient?

Thank you in advance for you assistance in arriving at a solution.



edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by wildblue
close date 2017-12-18 00:18:24.981810

1 Answer

Sort by » oldest newest most voted

answered 2016-08-04 23:14:06 +0100

Mano Engel gravatar image

updated 2016-08-04 23:14:43 +0100

Hi, Your current listbox sql looks pobably like this:

SELECT "lastname", "id_person" FROM "namesource" ORDER BY "lastname" ASC

by changing it to the following:

SELECT "lastname" || ', ' || "name", "id_person" FROM "namesource" ORDER BY ("lastname" || ', ' || "name") ASC

you should get the requested list. Obviously, you will need to amend the fields- and table-names.

edit flag offensive delete link more


Thank you for the reply. Will play with it and see how it works out for me. Am new to SQL, so I have a learning curve there to overcome LOL This will be a good lesson. Again Thank You

wildblue gravatar imagewildblue ( 2016-08-07 04:25:44 +0100 )edit

Question Tools

1 follower


Asked: 2016-08-04 22:07:21 +0100

Seen: 441 times

Last updated: Aug 04 '16