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

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  

×