Ask Your Question
0

[Base] Populate fields in a table using lists of two other tables

asked 2018-12-27 19:05:57 +0200

fbaldeva gravatar image

Hello All,

I'd like to know if Base/Forms is able to do the following.

I have three tables.

table_worker with one field called worker_name and a bunch of names,

table_shift_time with one field called shift, and data (day, swing, graveyard),

table_schedule with two fields (worker, shift)

Can I use a form to display the data in table_worker table and table_shift_time as drop-down lists, then have a user pick/highlight the worker and shift and have the choices populate table_schedule?

If so, can you point me to the documentation area, video tutorial, or example(s) that I can learn how to do this from?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-12-27 19:57:15 +0200

Ratslinger gravatar image

Hello,

What you need is simple list boxes based upon table data. First, in case you don't have this, here is the page for Base documentation -> LibreOffice Base Handbook.

Chapter 4 - Forms describes the list box and use. The combo box is similar but allows entries not in the table. Nor can it substitute values saved. List box is usually preferred for what you want.

Each of your tables should have a primary key of type Integer - usually auto increment.

So your resulting form is simple. Attached is a quick sample with your requirements:

Sample ------ListBox.odb

edit flag offensive delete link more

Comments

Thank you. This is what I wanted.

fbaldeva gravatar imagefbaldeva ( 2018-12-27 22:23:17 +0200 )edit

@fbaldeva

As you have been helped, please help others to know the question has been answered by clicking on the ✔ in upper left area of answer which satisfied the question.

Ratslinger gravatar imageRatslinger ( 2018-12-27 22:33:32 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-12-27 19:05:57 +0200

Seen: 32 times

Last updated: Dec 27 '18