PowerFilter with many filter rows but only one query in base

Discuss the database features
Post Reply
flanello
Posts: 1
Joined: Thu Mar 23, 2023 9:13 am

PowerFilter with many filter rows but only one query in base

Post by flanello »

Hello I'm working with the (excellent) PowerFilter example.

I want to expand it so that the filter table has more rows with filter criteria. And then I want to import/copy the filtered data to calc.
This could be done by creating many queries in base with different FilterIDs set ("F"."FID" = 2), and then importing this queries into calc. However this gets messy.

Is it possible to have only query where the filter ID comes from calc and then the result is copied to calc?
Perhaps with a macro in calc?
LibreOffice 7.4 on Ubuntu
F3K Total
Volunteer
Posts: 1038
Joined: Fri Dec 16, 2011 8:20 pm

Re: PowerFilter with many filter rows but only one query in base

Post by F3K Total »

Hello,
no macro necessary. Do you know CTRL+SHIFT+F4 to see your registered databasedocument?
Enter the filtercriteria here, then update the databaserange in calc.
  • MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
  • my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: PowerFilter with many filter rows but only one query in base

Post by Villeroy »

It is possible to attach filter forms to Calc: viewtopic.php?t=21099&p=96427#p96427

P.S. and by the way: I use the same method with a Writer template where the user selects a letter receipient from a listbox. The listbox value is stored in a filter row and mail merge fields are filled with data from this distinct record WHERE "Receipient"."ID"="Filter"."INTEGER_1" AND "Filter"."ID"=1. The listbox itself and the save button are set to non-printable.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply