solved jrCore_list search with multiple values

blindmime
@blindmime
9 years ago
772 posts
I have a quota called Service. I have a field called profile_category which can have multiple values like "Dining,Bar Service,Catering".

I have a quota called Category with profiles named with the possible profile_category values (Dining, Bar Service, etc.). On these profile index pages I want to list 5 Service profiles with a profile_category value which equals $profile_name. For instance, on the Dining profile index page I want to list 5 Service profiles that have chosen Dining as a profile_category.

I can use search2="profile_category = `$profile_name`" as long as profile_category has only one value, but if a Service profile choose more than one category (like Dining,Bar Service,Catering) that won't work.

What's the answer?
updated by @blindmime: 08/08/15 09:01:24AM
michael
@michael
9 years ago
7,715 posts
not understanding the question sorry. why would $profile_name equal the profile_category?

--edit--
I think you might be after the wildcard feature?

If my profile has
profile_something = "dogs, bees, fish"

Then:
{jrCore_list module="jrProfile" search1="profile_something = dogs"}

I will not turn up in the list because my profile_something does not = dogs, it equals "dogs, bees, fish"

If i want it to turn up I can search for:
{jrCore_list module="jrProfile" search1="profile_something like %dogs%"}

Then I will be in the results.

%dogs means "anything before dogs" so would match hotdog, blackdog, bigdog but not dogfood.
dog% means "anything after dog" so would match dogfood but not blackdog, bigdog.
%dog% means "anything before or after dog" so would match dogfood and blackdog and bigdog. but would also match topdogracer because it contanins dog.

updated by @michael: 07/08/15 12:30:58AM
blindmime
@blindmime
9 years ago
772 posts
Perfect! Thanks, Michael.

Tags