31 Jul 2025 09:49 AM
Hi,
I'm using the FilterField component to filter data from Dynatrace with DQL. My goal is to apply filters server-side only — no frontend processing.
Currently, I’m not aware of any built-in query builder. What’s the best way to translate FilterField input into DQL consistently?
For example, this filter value :
(country ~ US AND population >= 100000) OR (country = EN AND population < 7000000)
would generate this filter :
| filter (contains(city, "US") and population >= 100000)
or (country == "EN" and population < 7000000)
Are there any utilities or examples that help map user inputs to DQL syntax like contains, lower, or logical operators ?
Thanks,
Birahim
Solved! Go to Solution.
31 Jul 2025 10:09 AM
Hi Birahim,
Could you explain what you mean with applying filters server-side only, considering that FilterField would be used to allow users to enter filters, do you mean that you want to fetch specific data using DQL filters?
Or do you want to know how DQL filter statements are generated from filter field input?
31 Jul 2025 10:12 AM
I want the user to input a filter, which the app will convert into a DQL query and use to refetch the data accordingly.
31 Jul 2025 12:00 PM
Hi xBirahim.
As of now, there is no mapping to DQL from FilterField because originally we wanted to keep the FilterField component DQL agnostic. Currently, it's on our roadmap to offer a mapping for it.
Meanwhile, here there is some documentation on how to map from FilterField to DQL in case you want to build the mapper yourself.