Sub-querying a Canned Search? Is It Possible
Is it possible to filter or otherwise interact with a stored search?
I'm trying to automate a monthly report. I've created store searches for the date range from now until 2019. That search just returns the records received that month, which is great. But I'd like to provide some overview information, from the found set, such as 'how many came in as calls vs email', a language breakdown, etc.
I know this can be done with a custom query, but I was hoping to somehow take advantage of low's date range functionality to do it, if possible.
Replies
Low 23 Apr 2018 17:48
Well, not exactly sure what you mean by a 'Canned search', but any search query, bookmarked or stored as a shortcut, can be used to populate a (partially hidden) search form, that in turn can be submitted again, amending or refining the first search results.
allgood2 23 Apr 2018 17:52
I meant saved or stored (already completed). I didn't see details for doing this in the Documentation. Where would the details be? And is there an example template? Thanks.
Low 23 Apr 2018 17:58
No real examples for this specific case, but imagine you have a search form on template A, that submits to template B, which also contains another search form that has more fields than just the fields in A. You could even repeat and submit B to C, which contains even more fields.
For example, the form in template A only contains a Keywords input field. The search results page then shows results for given keywords, as well as a form containing those keywords and a list of categories. You can now search by keywords and category, and because the keywords are already there, it effectively means you're refining the search.
You can even use the remember="" parameter on the form tag if you do want to submit pre-submitted values, but don't want to add them to the form itself.
allgood2 23 Apr 2018 18:13
GREAT! Thanks. I'll play around with it. Sounds like what I need. I just need the date range passed for some subqueries that are just returning the count of specific items within that date range, such as 500 Complaints, 300 via the Web, 150 via SF Office, 50 via LA Office. But set-up so the user only has to click on a stored date range to see the report.