I’m trying to use a button on a view to set the selection criteria for that view. The idea is that the user clicks the button and a dialog box comes up to pick a year (yearchoice), then a box to pick a month (monthchoice), and finally a box to pick a day (daychoice).
I then want the selection formula set by lotusscript to something like:
Just a thought here - I hope this is not a shared view that multiple users would be accessing at the same time - if so, the second person who sets a different year will “corrupt” the view of the first person.
Rather than a View, use a Shared Folder - Private on First Use. Use the LotusScript to perform a NotesDatabase.Search, and place the resulting document collection into the Folder. The “Private on First Use” will guarantee that users won’t step on each other’s results, as well as not tying up server space.
You wont want to do this on a shared view and it actually is a pain to code really if at all depending on your security policy. You should consider using a categorized view (categorized by date) and then embed the view to a form with fields that a user can use to select the date (not sure why you would use separate fields for year, month, and day though)… set the embed view’s show single category setting and make sure your date selection refreshes the form. You should be good to go.