1

I'm trying to bind a serie of simple lists with 2 values to a DDL in LibreOffice Calc. I want the DDL show the description and that returns the relative ID in the linked cell. I currently can just partially do that, I'm unable to show the description in the DDL, as per my image:

enter image description here

I have other lists but the concept is the same, the list should always show the decription and return the relative ID, every list is on its own, so element in list A is not in list B as they are groupped up by type.

The following are the settings in my DDL, the marked setting is always disabled, regardless of what other setting I select. The marked setting should be "data field" and I suppose that it should allow me to specify what column in my list contains the data.

enter image description here

1
  • Presumably, DDL is short for drop-down list.
    – Jim K
    Jul 7, 2018 at 14:12

1 Answer 1

0

In your example, the control is not bound to any data source. So, it cannot be bound to an underlying field.

The full solution is to create a data source in LibreOffice Base and then use it as the underlying source for the form. Then it is straightforward to bind the combo box control to a field, either through a wizard or by changing the settings.

However, perhaps you want to avoid the complexity of Base. In that case, if the descriptions are unique, then use those as the source of the list, and get the IDs with a function such as VLOOKUP.

EDIT:

Here is an example of VLOOKUP in A6, where A5 is the linked cell.

VLOOKUP(A5;B2:C3;1)

4
  • I have formulas to calculate prices in relation to the selected items, interacting with base or other external data source would make it more complex. If I get your solution right I should use a swap cell to return the description then in my printed portion of the sheen return the result of the lookup. Do you know what is the difference between the 2nd and the last setting, respectively "cell area of origin" and "list content"? I'm used to DDL to have a data value and a screen value, this is the case of programming and also HTML, I keep trying as there must be a way in libre office aswell.
    – S. W. G.
    Jul 8, 2018 at 16:31
  • "List content" is when the control is bound to a data source such as Base. In that case, it can be the name of a table or query, or it can be an SQL statement.
    – Jim K
    Jul 9, 2018 at 13:46
  • It sounds like you have understood my solution correctly, but to make sure, I have edited the question to show an example.
    – Jim K
    Jul 9, 2018 at 13:47
  • Since there is no guarantee that descriptions will always be unique, I have joined the ID to description in another colum (hidden) then ill be using this in the DDL making it unique-like descriptions.
    – S. W. G.
    Jul 10, 2018 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.