# No variables shown for Back End filters - Supabase

**URL:** <https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805>\
**Category:** How do I?\
**Tags:** supabase\
**Created:** [December 7, 2023, 4:47pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805 "2023-12-07T16:47:49Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 7, 2023, 4:47pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/1 "2023-12-07T16:47:49Z")

</div>

Hello!

I’m currently dealing with a large dataset comprising 10,000 rows from the Supabase DB. Clearly, it’s not practical to filter all this information in front-end with filters. Therefore, I’m looking to implement backend filtering.

The idea is that users can select filters, and based on their choices, the system will fetch the relevant data from the Supabase DB. However, I’ve encountered an issue where no variables are being displayed when attempting to create backend filters. I’m unsure if this is a bug or if I might be overlooking something in the process. Can you provide any insights or guidance on this matter?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/8/83cc9b77244989a474bfc5ff60bf1226691799a0.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 4:57pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/2 "2023-12-07T16:57:58Z")

</div>

You might want to click on the arrows next to the close, that might expand some options. Maybe bind/unbind.

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 7, 2023, 5:34pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/3 "2023-12-07T17:34:55Z")

</div>

@Broberto Deam, you’re right. My bad.

When I try to bind it to my variable, it shows this error:  
name: “Error”  
code: “22P02”  
details: “Token “X” is invalid.”  
hint: null  
message: “invalid input syntax for type json”

Everything works when I filter the exact way in front-end, instead of collection.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 6:07pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/4 "2023-12-07T18:07:00Z")

</div>

Could you show us the filters?

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 7, 2023, 6:20pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/5 "2023-12-07T18:20:48Z")

</div>

@Broberto  
Tried it without variable, still doesnt work.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7906bcd74b799a92cd70388016296fa17272259b.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/abfeb896520f2729ecc347f2adee29a8daa77fdf.png)

Variable: Multiselect has value of array.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/11c927d3e206eedb7304536efe9727ddb7e94d0d.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/224e555c5dec9d4e6684c98bb1f7bbac177c22d1.png)

This works completely fine, when I filter the collection in the front-end, but I can’t do that.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 6:29pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/6 "2023-12-07T18:29:35Z")

</div>

I have a feeling that the slash might be a problem. Could you try with somerhing without a slash (/) to actually confirm if this is the issue? I haven’t used these filters often honestly, so I’m just trying possible solutions.

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 7, 2023, 6:54pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/7 "2023-12-07T18:54:52Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0156dd5a2517bed99511c3faf15be62ee66536f7.png)  
Guess it’s not the problem. @Broberto

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 7, 2023, 7:07pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/8 "2023-12-07T19:07:14Z")

</div>

This feels like a bug… @Joyce maybe you have an input for this?

---

<div class="post-metadata">

**Author:** ![Dominic](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dominic/32/5645_2.png) [@Dominic](https://community.weweb.io/u/Dominic)\
**Post date:** [December 7, 2023, 10:44pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/9 "2023-12-07T22:44:14Z")

</div>

@david

This works for me actually. I assume that your database field ‘product’ is an array of texts? I have a field which is an array of texts and I’m using exactly the same method as you and it is working perfectly.  
The error suggests this is a Supabase (PostgreSQL) error not WeWeb.

Supabase plugin filers items on back-end so double check your ‘products’ definition. The error suggests that PostgreSQL is receiving wrong datatype,

I even checked with 'X / Twitter" and it still works 🙂

 ![obraz](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/63f7da1e66cadbf2aba8965b4709f2eb61a70fa1.png)  
 ![obraz](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bdf8f1512a2b290b5106862d358b3466a4eebcd8.png)

The collection is empty as I do not have “X / Twitter” item…

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 7, 2023, 10:51pm UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/10 "2023-12-07T22:51:12Z")

</div>

@david what type is the column that is getting you an array?

---

<div class="post-metadata">

**Author:** ![Matthieu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/matthieu/32/1288_2.png) [@Matthieu](https://community.weweb.io/u/Matthieu)\
**Post date:** [December 8, 2023, 9:14am UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/11 "2023-12-08T09:14:07Z")

</div>

I also had an issue in the past using the same stack.  
I was using a JSON col in supabase but I had trouble using the arrays operators in the collection configuration in WeWeb.

I changed from a JSON type to an TEXT type to represent a real array and it works fine now.  
It might be a trick and maybe the front should be updated to better operate on JSON.

BUT : HOPE guys. The new version of the supabase SDK is being implemented and should soon be available to us.

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 11, 2023, 10:00am UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/12 "2023-12-11T10:00:31Z")

</div>

Yup, it helped to change to Text, instead of JSON in supabase side, but still having some problems.

“Ignore if empty” doesn’t work. @Matthieu did you also ran some problems with this? Building a directory with bunch of filters, that should fetch collections.

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://community.weweb.io/u/david)\
**Post date:** [December 11, 2023, 11:47am UTC](https://community.weweb.io/t/no-variables-shown-for-back-end-filters-supabase/5805/13 "2023-12-11T11:47:08Z")

</div>

Fixed it by creating custom “ignore if empty” and fetched all the time something changes.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9d30d376304461e951f21d63e4c7af6253d78e36.png)
