Jump to content
Sign in to follow this  
Master

Custom search that Includes any of enetered texts

Recommended Posts

I want to enter information on a text field and search the table for any of the entered values for instance if I enter "John Mike" I want to pull up any records that contains any of these names.

Share this post


Link to post
Share on other sites

If you send some words separated with OR like : John OR Mike and then in your report page receive this value and comparison type should be CONTAINS

You need to separate your search and report in two page: https://howto.caspio.com/tech-tips-and-articles/tech-parameters/how-to-separate-search-page-and-results-page-into-two-different-webpages/

Then in the search page add a JS to the Footer of the page to replace the spaces you have on search field with OR.

<script>
function rep(){
var str= document.getElementById('cbParamVirtual1').value;

document.getElementById('cbParamVirtual1').value =str.replace (/ /g, ' OR ');
}

document.getElementById('Submit').onmouseover = rep;

</script>

Virtual 1 if the virtual field you added to your search page and you need to check the value to the next page on submit.

Share this post


Link to post
Share on other sites

Pardon the thread necromancy but my Q is similar to this one so I thought I would share it here.

We have separate fields in our profile table for first name and last name.

Currently have a "one ring to rule them all" search bar that is supposed to search all given fields in that table for any keyword entered.  The fields we are using are firstname, lastname, FULLname (a concatenated entry derived from first, middle and last), category and keywords.  So a person can enter "John" for example and get all profiles with the name John in them -- including e.g. last name Johnson.

Problem is, if they enter a full name, such as John Smith, it returns NO results -- even if there are four people surnamed Smith, or three people named John.

http://go.pacific.edu/findanexpert -- that's the live; if someone could assist with this it would be most appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×