In many instances of trying to help end users get started with Specify, or solve a particular problem, I wished there was a way of sharing a query across user accounts. In other words, if I had created a query under my user account, I would like to be able to transfer this to another user as a copy. This would be enormously more convenient than showing them screenshots on how to manually set up the same query in their end.
I have been considering created a Stored Procedure on database level to that end, but it would be even better if ordinary end users could just do it at the push of a button so to speak. They could then either pick a user account from a list or maybe have a shareable link that then could trigger the creation of the query for whichever user that uses it.
I think this is already possible, with some small papercuts. As long as the user has the permissions to view and execute the query, you can create a query on your end and then send them the url. The only thing that changes in the url is the query id, for example, the below link should open up a query in the demo instance.
If the user opens that link, they should have the query appear on their page exactly as you created it. The only thing is that they have to Save as rather than Save, so their own “copy” would have a different id and potentially different name. Another papercut is that this can clutter up “your” queries because you may have some written for others, plus those you wrote for yourself. And of course, if the user that owns the queries goes away, it would break it for others unless they have saved to their own account.
Is this along the lines of what you were looking for? Or have I misunderstood?
@fedoras I use a mixture of the approach markp mentioned, and saving queries as xml files.
I maintain a user account that is JUST for queries. I have some stock queries saved to that user account. And then I bookmark the URLs from that user account and share the links with anyone who needs them. I also plan to have this account handle our dwc export query and other “important” queries that would break things if my user account were to ever go away. In some future version of Specify, it’d be nice to not have to do this in order to protect certain queries, because it is so easy to accidentally overwrite a query (by clicking save instead of save as, frustratingly easy to do).
I’ve been doing the separate Query user thing for a bit, but another thing I do is to just keep copies of the stock query xml in our dept network drive folder. Query xml can be exported by hitting Edit>Export on any query, and can then be loaded into a new query by any user by clicking Query>New Query>Import