Macro button to access Form-based filters functionality

Creating and using forms
Post Reply
papijo
Posts: 90
Joined: Sat Nov 08, 2014 5:46 pm
Location: Brittany, West of France

Macro button to access Form-based filters functionality

Post by papijo »

Hi all,
For reasons particular to my Base app I cannot display/enable the Form Navigation tool-bar in my form. I use the Navigation bar control instead. Bizarrely, the Control Navigation bar does not feature exactly the same buttons as the Form Navigation tool-bar(1). It misses the "Form-based filters" button, which I would like to make available to my app end-user. Since it is not possible to customize the Control Navigation bar(2), I would like to add a button pointing to a macro on my form.
My question is: what is the API command I should use in my macro to get access to the Form-based filters functionality? (if any)

(1) Why is that?
(2) Why not?
Attachments
2015-01-12_14-31-02.jpg
Last edited by papijo on Tue Jan 13, 2015 10:49 am, edited 2 times in total.
LO: LibreOffice 6.4.0.3 (x64) on Windows 10 64bits. Split database HSQL 2.3.4.
User avatar
MTP
Volunteer
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA

Re: Macro button to access Form-based filters functionality

Post by MTP »

Similar to [Solved] Open the sort dialog from a button?:

Set button property field "Action" to: DocumentOpenWebpage
Set field "URL" to: .uno:FormController/filter

The url is case sensitive.

As for your other questions, are you talking about the form control "Navigation Bar"? If so, are you sure the filter buttons aren't there? There is an option to customize which blocks are visible on the bar (position, navigation, record actions, and filter/sort blocks), maybe your control just has the filter/sort block set to "hide"?
NavBar.jpg
Last edited by MTP on Mon Jan 12, 2015 5:18 pm, edited 2 times in total.
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
papijo
Posts: 90
Joined: Sat Nov 08, 2014 5:46 pm
Location: Brittany, West of France

Re: Macro button to access Form-based filters functionality

Post by papijo »

Thanks for the quick answer, MTP. Unfortunately this is not what I want. That uno function opens the Standard Filter dialog, which is already available from the Control Navigation bar. What I want is the Form-based filters functionality. :(

I found it here: https://www.openoffice.org/api/docs/com ... oller.html but do not know how to access it from a button/macro.
LO: LibreOffice 6.4.0.3 (x64) on Windows 10 64bits. Split database HSQL 2.3.4.
User avatar
MTP
Volunteer
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA

Re: Macro button to access Form-based filters functionality

Post by MTP »

There are some items that might help here: https://wiki.openoffice.org/wiki/Framew ... x_Commands

I tested a button with .uno:FormFilterNavigator and it did nothing. I also tested .uno:FormFilter and it does open up a window but I'm not sure it's the window you're looking for.
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
papijo
Posts: 90
Joined: Sat Nov 08, 2014 5:46 pm
Location: Brittany, West of France

Re: Macro button to access Form-based filters functionality

Post by papijo »

MTP wrote:I also tested .uno:FormFilter and it does open up a window but I'm not sure it's the window you're looking for.
Yes, that's the one I wanted! Many thanks. :super:

EDIT.- Actually, this still does not work. The .uno:FormFilter command does NOT work in a form which is set to Data > Navigation bar > No, which is what I wanted to do. :(
Last edited by papijo on Tue Jan 13, 2015 10:49 am, edited 1 time in total.
LO: LibreOffice 6.4.0.3 (x64) on Windows 10 64bits. Split database HSQL 2.3.4.
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: Macro button to access Form-based filters functionality

Post by RPG »

Hello

I think use: .uno:FormFilter

https://wiki.openoffice.org/wiki/Framew ... x_Commands

Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
Post Reply