Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic filter using Checkboxes?

Status
Not open for further replies.

NickyJay

Programmer
Sep 1, 2003
217
0
0
GB
Hi All,

I dont know if this is possible but i hope it is!!

I have a db or organisations and contacts at each. Each organisation is described by a sector type, this is basically a lookup table of id number and sector description.

The organisation records also hold an id number for the area they are in, this is again a lookup table of in number and description.

I currently have a feature that allows uses of the database - via a cf front end - to select contacts from an output of the contact table to add to a temporary table. This table is then used to output the full details of each contact and the user creates a mailling list from this.

What i want to do now is, allow the user to create their own filter of the sector types and areas to pull out only the selected records for their mail merge.

What i had in mind is a set of checkboxes, where the user can select all or only the sectors/areas they wish to include.

Please can someone point me in the right direction? I have searched on dynamic queries but havent a clue where to start!!

Nicola
 
the checkboxes should have the same NAME, but the value should be the value of the criteria you wish to filter (sectoe type ID?)

When you send that form info to the action page, the checkboxes will be sent as ONE form variable, and the value will be a comma list of the IDs checked off.


use something like below in the query that gets the data to display.

WHERE
sectortypeID IN (<cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#FORM.sectorcheckboxes#" list="Yes">)


Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top