Confusion on custom filter options

Hello again Cuba team,

I’ve got a filter issue that I need to figure out, but haven’t yet been able to from the documentation.

I need the availability of the user field in an entity to be a filter option, but in addition, and more specifically, I need to programmatically set the Date field to default to N days ago. The following is what I’ve tried and have applied as the default filter option, but it doesn’t do anything to the browse screen.

        <filter id="filter"
                applyTo="timeEntriesTable"
                dataLoader="timeEntriesDl">
            <properties include=".*"/>
            <custom name="dateFrom"
                    caption="Date"
                    paramClass="java.util.Date">
                @between({E}.date, now-1, now, day)
            </custom>
        </filter>

What am I missing in figuring this out?

Thanks in advance,
Adam

Hi Adam,
Have you checked the resulting SQL?

Hello Konstantin,

I’m afraid I’m not sure what is being referred to by checking the resulting SQL. Is there a way to view the SQL statement that is being generated for the filter?

Thanks,
Adam

Just turn on SQL logging as described here and apply the filter when the application is running.