OR queries in API action

Hi everyone,

I'm working with an API action where I need to filter a dataset:
image

There is a specific object(u_visibility_level) that can have multiple values: null or empty, elevation, yellow, orange, red.

I can filter by a single variable, but I want to pull the data that matches only yellow, orange or red - eliminating elevation would also work.

Is this achievable from this screen?

Thanks!
Nathaniel.

Hi Nathaniel,

The filtering you show in the screenshot is done at the API side, this is not a Wappler feature, so people here won't be able to answer that particular question of yours.

However, you can choose to filter at Wappler-side. I'm guessing you'd use a Repeat step to iterate each record and then a Condition to check the type, and then a Set Value to output the current $value. And then after the Repeat you'd use the flatten formatter to get it back to the correct format.

I lack the time to show this step by step, but feel free to ask any questions and someone will help you

Hi @Apple ,

Thanks for clarifying - yes, I can filter after I fetch the data, I was wondering if I could stream line a little bit more at the source.
Thanks for your advice!

What do your API docs about filtering this property? What is the expected value and do they support sending multiple values?

Hi @Teodor ,
It's servicenow: https://www.servicenow.com/docs/bundle/yokohama-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html

It supports sysparm_query operators that can be added at the endpoint. I'm playing with that right now.