Jump to content
  • 0

One Search Box, 4 search fields



I want a user to have one search box , but have that one search box search 3-4 fields..

If i tell my datapage to have the ability to search 4 fields, it ads 4 text boxes to the search screen.

can i consolidate it into one box, and the user will search 1 term, and it will take that term and display all matches within all the fields i set?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0


A Java script is needed for this purpose. Basically you will have 4 text boxes (search fields) but three of them will be hidden, the Logical Operator between these 4 fields should be OR, and the Java Script gets the value of the first text field and assign it to all other three fields, this way the search will query all four fields with the same value entered in the first field by user.

To get an idea how Java Scripts work in Caspio DataPages please take a look at viewforum.php?f=14

You can also have Caspio Professional Service department to write the script for you.


Bahar M.

Link to comment
Share on other sites

  • 0

Hello, just to add in the previous comment above. As I understand, you want to create a search field which can search to  the 4 fields, right? If that is the caseon your table, add another field and set it to Formula. Then, concatenate the fields you want to use in your report. If all your field are in Text datatype , you can use [@field:FieldName1] + ' ' + [@field:FieldName2] + ' ' + [@field:FieldName3]  + ' ' + [@field:FieldName4] on your Formula Field. Then, use this formula field as your search criteria, it should look like the attached screenshot. 

I hope that helps.




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...