Creating field in text from table caption numbers?

Is this possible in LibreOffice?

I have formatted a few documents recently (using master a master document template) that have several tables in each chapter. To create a single index in the master document, I caption them all, which numbers the tables sequentially through the document. This is great except for the following scenario: in Chapter 2, the subdocument which has Table 1 now appears as Table 4 (as an example) in the master document index. The text surrounding the table will often reference the table by its number in the subdocument ("As we can see in Table 1…), which is now Table [number] in the index for the document as a whole. So after creating all the captions, I have to go back and try to fix all the text by hand and make sure that the references to the table in the text reflects the actual table number in the index.

Is there any way to make this process less cumbersome? Is it possible to use a field of some sort in the text that would update to the correct table number in the global index in the master document?

Thanks for any/all thoughts and ideas.

Best,
Lisa

The simplest way is to caption your table “per chapter”.

When you Insert>Caption for a new table, push the Options button to access Numbering Captions by Chapter configuration.

To modify an existing caption number, double-click on the field containing the number. The Numbering by Chapter is at bottom right.

Your tables won’t be numbered consecutively but the combined designation is monotonous. I think this is the easiest thing with master/subdocuments: subdocs remain independent from each other and the master collect unambiguous numbers when creating the index.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer) or comment the relevant answer.