Example Hyperlink rendered by external default preference application (jpg, pdf, odt etc) from within a Base .odb file

I am a retired (2019) software engineer with 47 years of practice and expertise in data base design and modeling. I was an early adopter with a desktop database application called Knowledge Manager (aka K-Man) on a two floppy based IBM PC One in 1984. I also was an early adopter of Microsoft Access 1.0. I always wanted to find / use an Open Source desktop database development application. Hence this application that implements a hyperlink, using a regular Text Box bound control/field/column and when Double-Click(ed), will render the filename for each file that has a System Preference registered application via “xdg-open filename” and launching this command via the system shell.

Being use to having the hyperlink functionality available in Microsoft Access, I started to research the LibreOffice community blog looking for possible answers. All that I was able to find were “snarky” remarks that it could be done but no examples. Hence this application example.

This example has been developed on a Linux Mint (LMDE) OS. It has only been designed and tested on Linux Mint. On other platforms, it is up to you to adapt it to make it work.

This example assumes that you can create a simple table and can use the “Form Wizard” to create a simple form.

Here are the files:
LibreOfficeBaseHyperlink.zip

Download the zip and unzip into a folder where you have read/write privileges and open the odb Base container. Please open and read the file ReadMeHyperLinkDoc.odt

Hyperlinks are not implemented in Base. I can offer a simple macro in 2 variants:
https://forum.openoffice.org/en/forum/download/file.php?id=34141
Download the database document to a directory where macro code is allowed to be executed.
Open the database document.
The macro code is shown in form “Python code”. Click the button to install the code.
Edit the Setup table. Paste the system path with trailing slash (or Windows backslash) into the Value field of the row named “FilePath”.
Open form “URL Buttons” and add some file names to the first column existing in the FilePath. The push button should open these files with the default application.
The buttons above the other two columns should open http(s): hyperlinks and mailto: addresses. The text boxes above the buttons show the URLs called by the respective button. They are there for demo purposes and can be deleted.
The form has table data in the main form. The subform is linked to query “qCompletion”. Have a look at that query.
The first button is set up with a field name as property “Additional Info” and triggers macro “FileButton_Approve” from the “Aprove Action” event. “FileButton_Approve” converts the field’s system path to a file: URL.
The other two buttons are set up with their respective field name as property “Additional Info” and triggers macro “URLButton_Approve” from the “Aprove Action” event.