Need a simply way to perform a search or do a filter on a Notes view, using the Notes Client, and display the results:
An example solution to filter a view by user name:
Button to perform search:
@SetViewInfo([SetViewFilter]; @Name([CN];@UserName); "UserName"; 1);
Button to reset view:
@Command([OpenView]; @Subset(@ViewTitle; -1));
@SetViewInfo([SetViewFilter];"" ; "UserName"; 1);
Note: The key functions are the @SetViewInfo & @UpdateFormulaContext formula commands.
A meta-script alternative that simulates a search onto a new document:
1. Create a new document w/SaveOptions="0"
2. Do a db.Search and get resulting collection.
3. Populate Body field of report document by looping through results with either:
a. Printed newsletter type with doclinks to each document.
b. URL links where the url starts w/ notes://.
(Latter is my preferred as whole line can be linked. The notes;// URL works well on Windows machines. Have not tested this on Mac or Linux workstations.)
4. Do w.EditDocument to present document to user.
5. Give user Close button to close the form tab.
Note: You can also put the search field on the form and replace the report body field and re-present the form to the user with the links to the docs.