Hello,
I am new to this forum and to OpenOffice.
Sorry, I haven't found easy solution for my question, maybe not good in search ))
Here is my question:
I have 2 very simple tables.
Table "Operation"
ID, Name, ProjectID (it's for relationship with ID of second table)
Table "Project"
ID, ProjectName
In Operation form I am creating Listbox for ProjectID with data collected from "Project" Table ("ProjectName")
In the dropdown list I see Project Names. But after I choose the right name, I see just ProjectID.
I want the form to show ProjectName.
Could someone help, please?
Thanks.
Display Name, but use ID
Display Name, but use ID
MacOS X 10.13.6
OpenOffice 4.1.5
OpenOffice 4.1.5
Re: Display Name, but use ID
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 1551
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Display Name, but use ID
A list box control on a Base form uses two fields, a display field and a boundfield.
The display field must appear first and the boundfield must appear second.
For instance, open the Properties: List Box dialog for your list box and on the Data tab
the Data field would be "ProjectID" from the table "Operation".
Input required should be Yes
Set Type of list contents to Sql
the List content to
and leave the Boundfield set to 1 (changing it to anything else is futile)
The display field must appear first and the boundfield must appear second.
For instance, open the Properties: List Box dialog for your list box and on the Data tab
the Data field would be "ProjectID" from the table "Operation".
Input required should be Yes
Set Type of list contents to Sql
the List content to
Code: Select all
SELECT "ProjectName", "ID" FROM "Project" ORDER BY "ProjectName" ASC;
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: Display Name, but use ID
Thanks,
Yes it's working fine with Listbox without Editing or find possibility
But when it can be entered manually it doesn't work correctly.
Sorry, I am using not English version of Open Office, so it's possible to make some misunderstandings with UI element names ))
Yes it's working fine with Listbox without Editing or find possibility
But when it can be entered manually it doesn't work correctly.
Sorry, I am using not English version of Open Office, so it's possible to make some misunderstandings with UI element names ))
MacOS X 10.13.6
OpenOffice 4.1.5
OpenOffice 4.1.5
-
- Volunteer
- Posts: 1551
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Display Name, but use ID
I'm not sure what you mean when you say
If you are trying to add new entries into the "Project" table, that is not possible using a list box.But when it can be entered manually it doesn't work correctly.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11