Search Array for Duplicates Before Showing

I have a collection ‘Users’ and another collection ‘Teams’. Users belong to Teams in my database structure.

I have a function where I can select a user and add them to the team in Xano, that works great. What I’d like to do is not show a user if they already exist as part of the team I have selected. The users are stored in an Array in my database where multiple users can exist in one team.

Any idea how I can filter in Xano to only show users who are not already added to the team I am on?

1 Like

The contains or lookup formulas might do the trick:

Hey @patopt Xano as a filter called “unique” which allows you to transform an array into one with unique values. Sounds like this should help!

2 Likes

Hey Michael - Do you know where I can find this function? I’m not seeing it browsing around.