I am currently working on a pdf form in libre office draw that I will use on a website. The form inputs amongst other things “department”, “address”, “phone number”, etc in combo boxes. For the about 10 departments which are relevant in this case, I have all the respective fields listed in a table, that I use as a linked database (in libre office base). In my form, I am able to select each field independently from each respective combo box. Ideally, when filling out the form, one would only need to select the correct department, and the rest of the respective fields would be selected from the database, however I am new at using libre office, not experienced in using macros, and have not yet found a way for this to work. Have so far read the manual, looked at youtube and searched forums, but not found a solution. Would be grateful for any comments or pointers in the right direction.
See my answer and a comment below (original answer removed due wrong interpretation of question).
The answer Ratslinger gave to a question rather similar to yours (see link below) might be worth studying. Basically, it demos selecting from a dropdown list on a Base FORM to choose someone’s name, and then a button-press to display their address. There is a sample Base file attached if you want to study the technique.
Thank you for your reply. Maybe it was not clear from my post, but for my purpose no new data is going to be entered into the database. When the user selects an option from the “department” combo box (linked to my database), I am hoping to be able to auto populate the rest of the fields correspondingly (i.e. on the same row) from the database.
@mauve: So, you are just going to manually ‘transfer’ (type in) your your PDF FORM data into your Base form? Hope I have understood you correctly. Where you say…
"...one would only need to select the correct department, and the rest of the respective fields would be selected from the database"
That sounds like you are specifying a 1:1 relationship between department and the other contact data fields you mention. So if you have 10 departments, you would need only a 10-row table to cover all the required contact information. You could probably do what you want by having a LIST BOX drop-down to choose the department, store the department ID value (1-10) into a FILTER TABLE and then show all the contact details in a sub-form. Have I left anything out?
Yes, as you say, there is a 1:1 relationship between department and the rest of the fields (and I have all fields in my 10 row table). As mentioned, I am new to using libre office forms, but I will try to implement the solution you suggest and get back to you. Thanks!