Unexpected Problems Filtering Collection by Variable

Thanks so much for the thought and effort, Kevin!

I could make it work in a pretty straightforward way by sending the selected role id to the backend on dropdown value change. I’d just really rather not because that creates a much less seamless user experience.

Truthfully, I think there’s gotta be a way for the WeWeb folks to allow us to filter by number contained in array. Hopefully I am right about that and they are able to make it happen!

Yeah that’s what i was going to say. You could Just send the ID back to Xano and use the find all array function.

There’s probably some super simple answer lol that we are not thinking of.

@Joyce or @Quentin, any thoughts on this?

Being able to filter records by number within an array will be pretty important for my web app.

Hi @kyanaloe :wave:

This should be possible but let me check your project. Could you share a link to the editor with me please?

Sure: Editor - WeWeb

If you land on the Manage Users page as intended, you’ll see that I am attempting to filter the collection on that page using the Primary Role dropdown. Each user may have multiple roles, with the role ids in an array called justroles. The value of the dropdown is role id.

Ok, I’m really struggling with this. Not sure if it’s a bug on our side or if I’m using the wrong formulas. I’ll record a loom and share with the team.

Will keep you posted asap!

Thank you! Makes me feel a little less crazy knowing that you couldn’t get it to work right away either!

I look forward to hearing back from you and the team

1 Like

any updates on this? Thanks!

Hi Kyan!

Yes, it is indeed a bug – for some reason the array is understood as an object so doesn’t respond as expected to the no-code formulas.

We’ve created the ticket. The dev team is scheduled to look into it this afternoon but we don’t know if it’ll be a straightforward fix or if it might take a bit longer.

I’ll keep you posted in any case :slight_smile:

Hi again!

The bug is fixed.

Here’s a short loom explaining how to filter based on your variable.

EDIT: updated link to video to include sound! :sweat_smile: @kyanaloe

Thank you SO much! The @weweb-team is the best!

1 Like