I’d like to create a view that prompts the user each time upon opening for the month and year from a field named newDate. This would, in turn, set the view criteria to only include documents where the newDate field contains that month and year. Any suggestions?
Subject: View Criteria for a Monthly Report
- Make the view categorized by month and year.- Put the prompt code into the view’s PostOpen event, together with the @SetViewInfo code to set the particular category to show for that month and year which the user provided in the prompts.
Subject: View Criteria for a Monthly Report
Don’t handle it in the view. Create a view displaying all possible documents categorized by an expression combining month and year (for example, something like @Text(@Month(newDate)) + “/” + @Text(@Year(newDate))). Embed the view in a form. Create fields allowing the user to select month and year. Create a computed field combining those into an expression (Monthfield + “/” + Yearfield). Set the embedded view to display only a single category, using the computed field for the category value.
Subject: RE: View Criteria for a Monthly Report
Thanks M. I’m with you until setting the embedded view to display only a single category. This is my first time using an embedded view. Can you give me more info?
Subject: RE: View Criteria for a Monthly Report
When you embed the view, look over in the objects pane. There are two things you can program for an embedded view: Embedded Selection and Show Single Category. In Show Single Category, put the name of the computed field, or just put the expression you’d use to compute the year-month expression.
Subject: RE: View Criteria for a Monthly Report
M,Your solution worked beautifully. Thanks so much for taking the time to help others.
Elli
Subject: Prompt User for a View Selection Date Range
I need to create a view that first prompts the user for beginning and ending dates. It should then set the view selection based on the user’s input retrieving all records where a particular date field falls into that date range. Any ideas?