Instead of fields, create a different page style for the last page. Then enter whatever is needed in the footer.
Headers and footers are the same across all pages with that style. So a condition like currentpage == page
is not possible in the footer. Note that page
confusingly refers to the total number of pages.
Furthermore, as you apparently know, there is no such variablecurrentpage
. According to https://help.libreoffice.org/Writer/D...:
You cannot use internal variables, such as page and chapter numbers, in condition expression.
To me, this seems unlikely to change and would require a great deal of effort to implement. However, you could file an enhancement request and see if anyone is willing to tackle it.
A workaround to determine in the text body whether it is the last page is to increment a variable on each page. I do not see how this would be useful, but here is a sample file: Last Page condition.odt