Skip to main content
Participant
June 23, 2009
Answered

CFLDAP - Conditional Filters Possible?

  • June 23, 2009
  • 1 reply
  • 555 views

I am building an LDAP contact search form.  The search form provides four possible search criterion: First Name, Last Name, Department and Location.  The idea is that a user can supply any combination of these 4 attributes to search LDAP for a contact match.  Outside of writing an insane CFIF block, is it possible to write a dynamic CFLDAP query?  Where each form attribute passed is dynamically supplied as a fliter within the CFLDAP tag?

I can't seem to find any post on the matter.  Anyone?

This topic has been closed for replies.
Correct answer ilssac

The filter paremeter of the LDAP tag is just a string.

Dynamically build the string for your filter as a variable.

Use said varialbe in the filter parameter of the LDAP tag.

1 reply

ilssac
ilssacCorrect answer
Inspiring
June 23, 2009

The filter paremeter of the LDAP tag is just a string.

Dynamically build the string for your filter as a variable.

Use said varialbe in the filter parameter of the LDAP tag.