When using a $$ViewTemplate, DO NOT place a Notes 'Query' field on the form (or
subform if that is what you prefer to use).
When performing the query, the query uses the Notes 'Query' field and not the
HTML field you coded. Therefore the Query is "" and undefined.
Other than that the code works great. (Thanks Jake!!)
If you use '$$ViewTemplate for Viewname' you can replace 'All' with 'Viewname'
if you only want to search the view that is currently displayed. (Unless you
place the 'function doSearch' somewhere other than the subform (if that's what
you use), you can't control which view is used for the query.)
To --> openDbRelativeURL("{ViewName}?SearchView&Query=" + s.value);
One problem I have run into: I have not found a way to capture the name of the
view that $$ViewTemplateDefault is displaying when using an embedded view or
$$ViewBody field. If I were able to capture that and assign a variable or
populate a field, I could use that variable in the openDbRelativeURL command to
only search the displayed view.
If you've got an answer to capturing the view that $$ViewTemplateDefault is
displaying, it would be appreciated.
When using a $$ViewTemplate, DO NOT place a Notes 'Query' field on the form (or subform if that is what you prefer to use).
When performing the query, the query uses the Notes 'Query' field and not the HTML field you coded. Therefore the Query is "" and undefined.
Other than that the code works great. (Thanks Jake!!)
If you use '$$ViewTemplate for Viewname' you can replace 'All' with 'Viewname' if you only want to search the view that is currently displayed. (Unless you place the 'function doSearch' somewhere other than the subform (if that's what you use), you can't control which view is used for the query.)
Change --> openDbRelativeURL("All?SearchView&Query=" + s.value);
To --> openDbRelativeURL("{ViewName}?SearchView&Query=" + s.value);
One problem I have run into: I have not found a way to capture the name of the view that $$ViewTemplateDefault is displaying when using an embedded view or $$ViewBody field. If I were able to capture that and assign a variable or populate a field, I could use that variable in the openDbRelativeURL command to only search the displayed view.
If you've got an answer to capturing the view that $$ViewTemplateDefault is displaying, it would be appreciated.