MultiSearch Filtering Functions

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 8, 2011   (RSS)

Re: [Rusty] MultiSearch Filtering Functions

By Jason - February 1, 2011

Hi Rusty,

searchMultipleTables() doesn't support a manual "where" option. It just searches the specified fields from the specified tables against what you entered in the text box.

There are a couple of options to accomplish what you're trying to do. You could filter your results by checking the value of fields as you loop through them. Another option would be to not use MultiSearch and instead to two getRecords calls and create manual where clauses for those.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] MultiSearch Filtering Functions

By Rusty - February 8, 2011

This is somewhat related... I'm trying to filter content based upon the presence of a users UserNum in an array. The array is created by an admin who makes entries via a multi-select drop down list with CMS.

I know you said you that searchMultipleTables() doesn't support a manual "where" option, but what about the ability to search ONE table? I just need to check each table to see if a userNum is present in that record, and then IF it's true show that record, otherwise continue to the next and try again.
Rusty

Re: [Rusty] MultiSearch Filtering Functions

By Jason - February 8, 2011

Hi Rusty,

If I understand correctly, you're best bet is to only return records where the user's num appears in the multi-select drop down. If this is the case, I think this will do what you're looking for:


http://www.interactivetools.com/forum/gforum.cgi?post=86190#86190


Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/