verbal-limeV
Refine2y ago
28 replies
verbal-lime

How to alter the key that is added to the query when using a custom filter?

When using a filter that is prebuilt, for example for dates „is on or before” will add to the column’s name _lte. Hence if my column is named „Date” and i apply the „is on or before filter” and specify date to be 1.01.2024, then the query is as follows: „Date_lte: 1.01.2024.
I had to implement my own filter for a date interval, from and to with two values. I got to the point when both are sent in one query and this works, but the issue is that the keys for both are just „Date” and I cannot differentiate between the two, nor what filter is even sed. What I currently get when putting two dates is:
Date: 1.01.2024
Date: 2.01.2024
And this is a single query.
How can I add something similar to what the _lte” does, also per date field? (So I would want to have:
Date_from: 1.0.1.2024
Date_to: 2.01.2024
As a single query)
If something is unclear or more is required let me know. Much appreciated for your time on reading this already.
Was this page helpful?