Addon not working

Hi ,

I'm creating a matching platform that works like this:

  1. A user sends a wishlist_id to Xano.

  2. From that wishlist, I pull the volumes it contains.

  3. I then query records from my users table and inner join the annonces table.

  4. I look for the volumes in the annonces matching the volumes in the wishlist using overlaps with

  5. This allows me to return only the users who have created an annonce containing volumes matching the wishlist.

The problem comes after this step. Once I have my list of users returned, the annonces associated with these users are not filtered. I need to filter them again to only return the annonces that actually contain the matching volumes. I have tried two different approach:

  1. add an addon on the final annonce object and filter the addon with the same logic than the step 4. Problem, when passing the volumes list in the addon it stop working. I precise it is working when running in the addon library but not when integrated in my function. The problem should be in the parameters I am passing but I have tried them all and it is never working.

  2. Use a reverse approach, I start by filtering the annonces table and then I group by user, very straighforward but I can't have the results of the annonce once I grouped them.

First screenshot is the result with annonce object returning empty:

Capture d’écran 2024-07-31 à 20.30.10.png
162.72KB

Here is the addon working just fine

Capture d’écran 2024-07-31 à 20.32.09.png
128.44KB

loom video of the complete build an error has been corrected the $.this has been changed into $this in the addon parameters:

https://www.loom.com/share/24d6a41a3ea543b999a5b7b3b33bf4f1?sid=fac8a22a-bbbf-44b3-ad8e-4273000dcffc

What is the best approach and How can I make this work ? Thank you

7 replies