How to had a reference in my documents?

I have a multi page document I need to bind, at the end of the doc, there is an Appendix and a serie of data tables, inside my text I need sometimes to add the relative reference table, something like this:

cf. Appendix, Table B, page 341

I need this reference to be dynamic, pulling the correct page number. How do I achieve this in LibreOffice?

Improve your question by modifying it (=don’t use a comment; group everything in the same post) to tell us how you label your table (using the caption feature ot doing something equivalent manually). Attach an example file (up to 5 pages long) since it is easier to see what you’ve done.

Don’t forget to mention OS name, LO version and save format (we’ll know from the sample but it is nicer to state it explicitly).