asked on February 1, 2024

I'm trying to create a custom search page wherein the user selects which metadata template they want to search under, and then have the option to use either, none, or both of the corresponding metadata fields to narrow down results.  Here's how it's set up right now:

 

The problem here is that it tends to just return ALL results for the second template type, regardless of additional field values, because the system considers the first criteria to be met, with blank fields not narrowing it down further.  It never gets to the second search group.

If I could figure out a way to specify "If SearchType = (Specific Template Name)" it would be simple, but I have not found any way to do that.  Does anyone know if it can be done?

I know another option could be to use custom search syntax with custom fields, like this:


However, there are two big issues with that approach:
1.  It takes away the "optional" part of the search, because if they leave a field blank it will look for entries wherein that field is blank (there aren't any)
2.  I wouldn't be able to incorporate the 'date range' feature for date fields unless I created another custom field, which loops back to issue 1.

Is there some way to say "If variable = x, do y", or does anyone have an idea on another way to accomplish my goal?  Or is it just not possible?

Currently using Weblink 10.2 but we are updating to 11 in a couple of weeks.

0 0