How to change default directory on file selection control in Libreoffice Base form?

I have used file selection control to add file links.
There is no serious problem to use though.
I want to set the default directory when I click the control.
currently, It open a nautilus and default directory is my home directory.

Is there any way I change it to other directory?
(eg. /home/user/image_temp/)
so always I can open the folder when I use it.

OS : Ubuntu 20.04.5 LTS
Libreoffice Version : Version:

Since many years (20?) I use to use the following Basic code for a simplified file picker. It is simplified because it uses one filter string allowing a single file selection. This is the simplification I need in 99% of all practical use cases.

Function pickFile(sTitle$, sInit$, sFilterLabel$, sPattern$) As String
REM return a single file URL or ""
REM dialog starts at office default directory if sInit = ""
Dim oPicker, x()
	oPicker = CreateUnoService("")
	oPicker.appendFilter(sFilterLabel, sPattern)
	if oPicker.execute() then
		x() = oPicker.getFiles()
		pickFile = x(0)
End Function

And for the sake of completness:

Function pickFolder(sTitle$, sInit$) AS String
REM return folder URL or ""
REM dialog starts at office default directory if sInit = ""
Dim oPicker
	oPicker = CreateUnoService("")
	if oPicker.execute() then
		pickFolder = oPicker.Directory
End Function

Both functions return a file URL or an empty string in case of cancel.

Thank you for your kind and precise information.
But still got an error. "The folder Contents could not be displayed.
Operation not supported "
Do I miss something or any setting do I have to change?

But It’s very informative. Thanks a lot.

A test routine. Replace the constant with something that exists on your system. Notice that it is possible to define one filter for many file types.

Sub test_FilePicker()
REM init path in system notation
Const cInit = "/home/andreas/Dokumente/LibreOffice/"
sPathURL = ConvertToURL(cInit)
	Msgbox pickFile(sTitle:="Test File Picker", sInit:=sPathURL, sFilterLabel:="Various ODF Docs", sPattern:="*.odt;*.ods;*.odg;*.odp;*.odb") 
	Msgbox pickFolder(sTitle:="Test Folder Picker", sInit:=sPathURL)
End Sub

Thanks a lot. I forgot to add this.
It beautifully works.
got bless you. :smiley: