The form contains "searchInputField" and simple button for it. Below the button, there is a view.
How can i specify SELECT formula in VIEW according to searchInputCriteria? I want to refresh VIEW when button is clicked after setting "searchInputField". It should be like simple custom search.
On button click i have done:
@SetEnvironment("criteria", "searchInputField");
@Command([RunAgent];"searchAgent");
@Command([ViewRefreshFields]);
My agent does:
SELECT @Like(propertyA, @Environment("criteria"));
But it doesn't do anything. I'm new to Lotus Notes. Please, give me some guidelines
Thanks in advance
You could use this script inside your button but it won't work in a dynamic, real-time way:
The only way to see the changes in a reliable way is to close and reopen the database. It's also a very expensive way of working in terms of performance. I advise you not to use this way of working to change view selections 'on the fly'. It can be useful to change views that stay static for a while after the change. For example you could write an agent that changes the selection formulas on a periodic basis (e.g., monthly or daily at a non-peak time or during a maintenance window).
In your case I advise using single category views or to populate a folder on the fly. Single category views will work much faster than dynamically calculating the
DocumentCollection
used to populate a folder.