# Supabase Database | Select dont have "is empty" filter like in collections

**URL:** <https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669>\
**Category:** How do I?\
**Created:** [January 19, 2026, 10:05pm UTC](https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669 "2026-01-19T22:05:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoran.Velinov](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@Zoran.Velinov](https://community.weweb.io/u/Zoran.Velinov)\
**Post date:** [January 19, 2026, 10:05pm UTC](https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669/1 "2026-01-19T22:05:59Z")

</div>

Hello,

I try to run Supabase Database | Select action in workflow and generally is ok. But how to filter by empty column like it is in collection?

Here is Database | Select in workflow and i cant find filter if its empty. I tried to to change different conditions and for value to write manually, empty, EMPTY, “empty“, “EMPTY“, null, NULL, “null“, “NULL”, just ““, leave nothing… but always return error.

 ![{7F7FAB66-64DB-473B-B2CA-E9A82252DCD2}](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/99bec1981e54f1d0082f3ff52d0e4f2612d44b70.png)

From other side, in Collection have filtering by “Is empty“. I need to change filter dynamically so it become problem. Also Database | Select action dont have Sort By which exist in collections.

![{E66F779F-5809-4BEC-906E-F7A8C5448015}](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/008fb3a255352f14d8aec784b21cf30f0c1b3ef9.png)

Why dont have option me to write some SELECT query in Database | Select action?

Hope somebody will help. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Zoran.Velinov](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@Zoran.Velinov](https://community.weweb.io/u/Zoran.Velinov)\
**Post date:** [January 20, 2026, 1:20pm UTC](https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669/2 "2026-01-20T13:20:46Z")

</div>

I have even tried to make postgress function with arguments but when i call the function from weweb it gives me error:

message: “invalid input syntax for type uuid: “””

I have try with empty value for argument in workflow action or with null. Its always same.

How to send real: Is empty, null etc. from Weweb?

---

<div class="post-metadata">

**Author:** ![Zoran.Velinov](https://avatars.discourse-cdn.com/v4/letter/z/f1d935/32.png) [@Zoran.Velinov](https://community.weweb.io/u/Zoran.Velinov)\
**Post date:** [January 20, 2026, 3:01pm UTC](https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669/3 "2026-01-20T15:01:27Z")

</div>

I solve it. This is DB Postgres Function if somebody need something like this:

`CREATE OR REPLACE FUNCTION public.get_categories(`  
`p_parent_id text,`  
`p_sort text DEFAULT ‘ASC’`  
`)`  
`RETURNS SETOF public.categories`  
`LANGUAGE sql`  
`SET search_path = public`  
`AS $$`  
`SELECT *`  
`FROM public.categories`  
`WHERE (`  
`– if frontend sends empty → treat as root category`  
`(NULLIF(p_parent_id, ‘’) IS NULL AND parent_id IS NULL)`  
`OR`  
`– valid UUID comparison`  
`(NULLIF(p_parent_id, ‘’) IS NOT NULL AND parent_id = (NULLIF(p_parent_id, ‘’)::uuid))`  
`)`  
`ORDER BY`  
`CASE WHEN UPPER(p_sort) = ‘DESC’ THEN position END DESC,`  
`CASE WHEN UPPER(p_sort) = ‘ASC’ THEN position END ASC;`  
`$$;`

WeWeb:

 ![{81D8CFE0-9A8E-4E4E-8801-BF3E01D2E652}](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d6b9514562cf5289e2cfb1e4f086c83e72142c5f.png)

---

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [January 20, 2026, 5:26pm UTC](https://community.weweb.io/t/supabase-database-select-dont-have-is-empty-filter-like-in-collections/20669/4 "2026-01-20T17:26:27Z")

</div>

Hey @Zoran.Velinov 👋

Thanks a lot for coming back to share your function and full setup, this is super helpful for anyone hitting the same limitation with `Database | Select` and `NULL` filters. ​

The collection approach you mentioned is definitely handy when things are less dynamic, but for your use case with the nested categories and runtime `parent_id` , your Postgres function + RPC solution looks like a very solid and scalable way to handle both the `NULL` logic and sorting.
