I use custom queries to extract csv data for use in Excel. I would like to run a set (between 4 and 6) of queries with one button click. Is this possible?
Anton
* Automatically running a set of custom queries
-
- Silver
- Posts: 5
- Joined: 22 Mar 2017 19:28
- Family Historian: V7
- tatewise
- Megastar
- Posts: 28413
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Automatically running a set of custom queries
Anton, welcome to your first FHUG posting.
I am a bit confused by the question.
Even if you could run several Queries with one click, how would the Result Sets get exported as CSV files?
Usually you would have to manually use a Save Results to File command for each Query.
It might be possible to use fhugdownloads:contents:utility_autohotkey|> Utility ~ AutoHotkey or similar tools, to program the FH keyboard presses to run each Query and the Save Results to File command automatically, but it takes a while to learn how to use such tools.
Another option is to write a Plugin that combines the logic of all the Queries and creates the CSV files all in one go, but learning the Plugin programming language techniques will take a while.
I am a bit confused by the question.
Even if you could run several Queries with one click, how would the Result Sets get exported as CSV files?
Usually you would have to manually use a Save Results to File command for each Query.
It might be possible to use fhugdownloads:contents:utility_autohotkey|> Utility ~ AutoHotkey or similar tools, to program the FH keyboard presses to run each Query and the Save Results to File command automatically, but it takes a while to learn how to use such tools.
Another option is to write a Plugin that combines the logic of all the Queries and creates the CSV files all in one go, but learning the Plugin programming language techniques will take a while.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Silver
- Posts: 5
- Joined: 22 Mar 2017 19:28
- Family Historian: V7
Re: Automatically running a set of custom queries
Thanks for getting back to me - I was hoping that it would either be possible to create a script with the answers to the query questions (include headers, name of csv, etc) embedded in the script, or to call a function to activate a specific custom query with the the required answers as function parameters.
As that doesn't seem to be possible I will have to consider writing a a plugin - I have never used lua but I have spent most of my working life in IT so I don't foresee any problems.
Just to let you know I am a great fan of Ancestral Sources and use it to enter all BMD, census, baptism and burial information and have just started using it for electoral registers. I have made a contribution. Is there a way to display the id with a fixed number of digits in the long and/or short title so, for example, id 123 would be displayed as 00123?
As that doesn't seem to be possible I will have to consider writing a a plugin - I have never used lua but I have spent most of my working life in IT so I don't foresee any problems.
Just to let you know I am a great fan of Ancestral Sources and use it to enter all BMD, census, baptism and burial information and have just started using it for electoral registers. I have made a contribution. Is there a way to display the id with a fixed number of digits in the long and/or short title so, for example, id 123 would be displayed as 00123?
- tatewise
- Megastar
- Posts: 28413
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Automatically running a set of custom queries
The fhugdownloads:contents:utility_autohotkey|> Utility ~ AutoHotkey should allow a script to be produced.
There are no FH built-in Functions to auto-run Queries.
For Plugins see the plugins:index#developer_guide|> Family Historian Plugins > Developer Guide.
It would be better to post AS questions in the Ancestral Sources Forum.
I guess you are talking about the Ref ID fields and {REF} keyword.
(It always helps to be specific, and as an IT professional you should know that.)
The Ref ID does not have to be numeric, so no fixed digit option is offered.
Or maybe you mean {KEYPERSON.ID}, etc, but still no fixed digit option.
There are no FH built-in Functions to auto-run Queries.
For Plugins see the plugins:index#developer_guide|> Family Historian Plugins > Developer Guide.
It would be better to post AS questions in the Ancestral Sources Forum.
I guess you are talking about the Ref ID fields and {REF} keyword.
(It always helps to be specific, and as an IT professional you should know that.)
The Ref ID does not have to be numeric, so no fixed digit option is offered.
Or maybe you mean {KEYPERSON.ID}, etc, but still no fixed digit option.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry