How to do Keyword Search across multiple fields?

FacebookLinkedInStumbleUponTwitterShare

Question:

How can I create a keyword search across multiple fields?

 

Answer:

This feature is on the roadmap, but if you need it now, use one of these two workarounds based on how you plan to use it.

  • Single Field Search – Your search form to contain only a keyword Search field and no other search parameters.
  • Complex Search Form – Keyword Search field will be a part of a more complex search form.

Single Field Search

This option is much easier to implement.

You need two DataPages. First, a submission form. In the submission form insert a virtual field and no other fields. The virtual field should pass its value as a parameter to the next page.

Second, for the next page you will need a Report DataPage setup with a predefined criteria (i.e. no search form). It should utilize the value passed from the previous page as its search parameter. The Logical operator between the search fields must be "OR" (the default is AND which must be changed). To learn more about virtual fields and passing parameters to a report see this article.

Complex Search Form

The fields that you want to use in the keyword search must be concatenated together ahead of time and stored in one field. This new field is for keyword search only and should never be made visible to users. Concatenating the data of multiple fields into one field can be done in two ways:

A. If the data is entered via a submission form use this JavaScript to concatenate the data into the designated field and submit it into the table.

B. If the data comes through an import process or by now much data is accumulated in your table; you can perform the concatenation in Excel and import the database back into Caspio or request a quick professional service through Caspio support.

 

 

Contact Support

Leave a Reply

 
© 2011 Caspio, Inc. All rights reserved! Sitemap | Terms of Use | Privacy Statement Suffusion theme by Sayontan Sinha