Hi James,
Yes you can seach on multiple columns in one search:
- Code: Select all
if ( controller.find() ) {
column1 = globals.mySearchVar;
column2 = globals.mySearchVar;
controller.search();
}
This is the equivalent of the following SQL:
- Code: Select all
SELECT id FROM theTable WHERE column1=? AND column2=?
But I think you want to do an OR search. So the value matches in project number OR project name.
Then you code would be like this:
- Code: Select all
if ( controller.find() ) {
column1 = globals.mySearchVar;
controller.newRecord(); // new search criteria
column2 = globals.mySearchVar;
controller.search();
}
Which translates into SQL like so:
- Code: Select all
SELECT id FROM theTable WHERE column1=? OR column2=?
Also use %, ! and # where needed.
Hope this helps