1. How do you place conditional search criteria in the criteria line of a cfsearch? I'm trying to say, for example, if the field activityDate1 is not blank, then search this column. Simply writing:
criteria="<cfif activityDate1 neq ''>cf_custom3>=#activityDate1#></cfif>"
or trying it like this:
<cfif activityDate1 neq ''>
causes an error. Can you include this kind of conditional code within a cfsearch?If so, how?
2. How do you search more than one column in a collection within the criteria. In other words, how do you search if
cf_custom1 = #form.field1# AND cf_custom2 = #form.field2#
I can't seem to make this work either.
3. My 3rd question I could likely figure out on my own if the other 2 above are possible and that is conditional AND combining... ie.... if formfield1 neq '' search it AND if formField2 neq '' search it, too...
Thanks in advance for your time.