Am 16.12.2014 um 21:43 schrieb Joel Madero:
> Hi All,
> 
> I have a form based on a table with FirstName and LastName, I want the
> form to have a dropdown with SELECT CONCAT(FirstName,",",LastName)
> 
> Is there a way to do this?
> 
> 
> Thanks!
> 
> 
> Best,
> Joel
> 

If you want to pick one distinct "Persons"."ID" from a listbox, get the
list box properties, tab [Data] and fill out like this:

Linked Field: Person_ID (name of the form's foreign key pointing to a
person in a persons table)

Source type: SQL

Source:
SELECT "LastName"||','||"FirstName"||','||"BirthDate" As "Visible", "ID"
FROM "Persons"
ORDER BY "Visible"

Bound field: 1 (the primary key ID from the persons table)

alternatively:
Source type: Query
Source: name of the query representing the above SELECT statement.

Tons of tutorials and examples:
> https://forum.openoffice.org/en/forum/viewforum.php?f=83

in particular [Example] Relations reflected by list boxes in forms
> https://forum.openoffice.org/en/forum/viewtopic.php?f=100&t=40444




-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to