I am pretty sure there is a simple answer to this but I have drawn a blank!
I have two date variables populated with a Start and an End date.
What I need is the date field to be set to this date range when the document is opened.
I cannot see a way of setting a range in the Select in Field Action of the Document Event Triggers.
Any help will be appreciated!
Thanks for the reply. My issue is not setting the variables, that part is fine. Sorry if I was not clear.
My problem is applying the values of the variables to the date field when the document is opened.
For instance, I set the end date to the latest activity in the financial year (say 15/10/2010), and the start date is simply the beginning of that year (01/04/2010 for example). Now, when the document is opened, I would like the date field to be set to the range 01/04/2010 to 15/10/2009.
The field is used all over the application.
Is there a way to make an OnOpen trigger that will set the a DateField field to a range as opposed to an individual date. Essentially I require the equivalent of:
Settings > Document Properties > Triggers > OnOpen
Action: Select in Field
SerachString: =Between varStartDate AND varEndDate
So when the user opens the application the DateField will already be set to the year to date latest data.
Maybe I need a Macro for this and fire the Macro in the OnOpen trigger.
In addition to the date range, my customer also wants to see the applications with blank date. How to achieve this?
I have tried below 2 options but they don't work:
1) ='>='&Date(vStartDate,'MM/DD/YYYY') & '<='&Date(vEndDate,'MM/DD/YYYY') & '=' & NULL()
2) ='>='&Date(vStartDate,'MM/DD/YYYY') & '<='&Date(vEndDate,'MM/DD/YYYY') & '=' & ''