on 2015 Sep 28 9:10 AM
Hello Experts,
We have a simple requirement but looks like complex to achieve.
we have a custom date filed in Master agreement and what our client needs is below report which contains only custom date as optional filter
whenever user gives date and click on show it should give the respective results and also
whenever user makes date filter empty and clicks on show it should fetch all the Master Agreements in which the date field is empty.
Please let me know whether this can be done or not
Thanks
Jitendra
Hi,
Yes this can be done, depending on how you built your query.
This is an example of a SQL statement in your query definition, where startDate is the filter prompt parameter name
<%AND("T1.CREATED_AT >= <%?(startDate)%>")%>
You put the filter startDate on optional and fixed operator.
When you enter a date it will show as from this date (in this example) and when you empty the date and click on show it will show all documents.
Second option is this.
You make a date range and by default set it e.g. from 01.01.1900 to 31.12.9999; if you don't change it, everything is shown and if needed you can set the range to reflect the date(s) you want to see.
here is a sample of such a statement in your query definition:
<%AND("T1.CREATED_AT >= <%?(startDate)%> AND T1.CREATED_AT <= <%?(endDate)%>")%>
Hope this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erik,
Lets say a custom date field is there and a query is written with the same custom date field as filter.
Now when I make the date filter empty and checked on show then the agreements which are having the date field as empty should be fetched(only empty) and when filter is populated with a value then respective results should be fetched.
Thanks
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.