Forum Academy Marketplace Showcase Pricing Features

"Search for" list that contains ANY of another list's items

Here’s my scenario…

Database

  • I have a thing in my database - let’s say “Animals” (giraffe, dog, emu, etc.)
  • I have a thing in my database called “Characteristics” (big, small, furry, loud, etc.)
  • The “Animals” thing has a field called “Characteristics” (which is a list of items from the Characteristics data type).
  • Each user has a field called “Preferences” which is a list of Characteristics.

Function

  • I have a page called “Animals You Might Like”
  • On that page, there’s a custom state called “selected-characteristics” which is a list, populated on page load with the user’s Preferences. The user can clear that custom state list and select different characteristics if they want.
  • I have a repeating group on that page that I want to return all animals whose characteristics contain ANY (not all) of the characteristics in the custom state list.

Can’t figure out what the search parameters would be for that repeating group:

Hi

Please remove the Contains from the search field.
Add :filtered
:advanced : this animal characteristics interset with Animals you might like user preferences:count > 0
Contains will check only one item.
Hope it works.

AAAAH! YES!!! @mani2726 Thank you, that’s perfect!

Also, why on earth is that so complicated haha. I would never have figured that out on my own, sheesh.

Appreciate your help. :slight_smile: