Caspio has posted a way to search multiple fields for one value. Here is another way.
In “Search and Report Wizard - Configure Search Fields,” Include the fields and change the Logic of the search so that a match in any of the multiple fields returns a record.
Now add into the header of that search form a Virtual Field (here named “correspondent”) and include Javascript in the header that copies the value of the Virtual FIeld into the form elements.
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.
Question
JohnM
Caspio has posted a way to search multiple fields for one value. Here is another way.
In “Search and Report Wizard - Configure Search Fields,” Include the fields and change the Logic of the search so that a match in any of the multiple fields returns a record.
Now add into the header of that search form a Virtual Field (here named “correspondent”) and include Javascript in the header that copies the value of the Virtual FIeld into the form elements.
document.addEventListener('DataPageReady', function (event) { const whoFrom = document.getElementById('Value10_1'); const whoTo = document.getElementById('Value11_1'); const correspondent = document.getElementById('cbParamVirtual1'); correspondent.addEventListener('change', setValues); function setValues(){ whoTo.value = correspondent.value; whoFrom.value = correspondent.value; } });
Then use CSS to hide the non-Virtual fields whose values are being set with the Javascript.
div[class^="cbFormNestedTableContainer cbFormBlock11"] > div[class^="cbFormBlock12"], div[class^="cbFormNestedTableContainer cbFormBlock11"] > div[class^="cbFormBlock13"] { display:none; }
In my case searching on the value of the Correspondent field returns record where the From or the To fields match the Correspondent criteria.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
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.