Search Form Expression Issue

I have this expression below. I am trying to use the same field input from a search form to filter the same spreadsheet by two separate columns . For whatever reason, when I add the second expression the search results fail. Is there anything that looks suspect in this that would cause this to happen? The first expression (highlighted in yellow) works by itself but when I add the second expression (highlighted in red) it fails. The syntax is not the issue because it passes. Please let me know if there is something amiss in my expression.

Your expression says that if Session(s) IS NOT BLANK, that column’s value MUST occur in BOTH Formatted_Session1 AND Formatted_Session2. Is that your intent?

1 Like

I am looking to write if Session(s) IS NOT BLANK, that column’s value MUST occur in EITHER Formatted_Session1 OR Formatted_Session2. Any ideas how I could build that in? Thanks for the response!

Change

AND(
  OR(...) ,
  OR(...) ,
  ...
)

to:

AND(
  OR( ISBLANK(...) , CONTAINS(...) , CONTAINS(...) ) ,
  ...
)
2 Likes

This solution is working but not with multiple selected options from an enumlist field in my search form. Thanks for the help Marc. Much appreciated.
I basically want to return all columns that contain any of the selected items in the enumlist search form field Sessions(s).


Well you didn’t say that!

Assuming [Formatted_Session…] values match exactly with [Session(s)] values:

AND(
  OR( ISBLANK(...) , IN( [Formatted_Sessions1] , [_THISROW].[Sessions] ) , IN( [Formatted_Sessions2] , [_THISROW].[Sessions] ) )
)

If they don’t match exactly, ummm… you’ll probably need a lot more complex expression, or you’ll be out of luck, or only allow a single selection (Enum instead of EnumList), and go back to CONTAINS().

2 Likes

Sorry I didn’t mean to offend you, I’m not being sarcastic. I generally appreciate your input. But that expression worked. Thank you so much!

2 Likes

well…I was :smiley:

1 Like

lol Thanks man.

1 Like