strange behavior with foundset and subset

Hi Guys,
I hope I can get your help with this one. I’m tearing my hair out.

When I load my solution, I have 1690 total records in the database.
If I want to find the following subset (psname is not null, lastname is null, jobgroup like 13%) I can do so by using a find form and entering !^ in the psname field, ^ in the lastname field and 13% in the jobgroup field. This produces the correct 100 records, and displays the data.

If I then try to put the same function into a find method like this:

forms.Employee.controller.find();
forms.Employee.psname != null;
forms.Employee.lastname == null;
forms.Employee.jobgroup == “13%”;
forms.Employee.controller.search();
forms.newResearchQuicklist.controller.show();

nothing happens, and I end up with the original 1690 records. I have tried the null with and without quotes.

Using a global function like this:

var maxReturnedRows = 10000;

var query = “select * “+
//” psname”+
" from personnel"+
" where psname is not null"+
" and lastname is null"+
" and jobgroup like ‘13%’"

var dataset = databaseManager.getDataSetByQuery(currentcontroller.getServerName(), query, null, maxReturnedRows);
var count = dataset.getMaxRowIndex();
//showRecords is a shortcut for the functions loadRecords(…) and show(), see those methods for futher explanation
currentcontroller.showRecords(dataset);

I at least get the correct number of records (100), but no fields are populated. Just blank records (100 of them).

If anyone can point me to the correct way to do this, I sure would appreciate it. I don’t have any problems with any other finds or data being displayed, just these 100 records.

I’m using:

Servoy 2.2.4
Microsoft XP service pack 2
MySQL 4.10.a on the PC

Thanks, I appreciate any help at all.

Graham

forms.Employee.controller.find();
forms.Employee.psname != null;
forms.Employee.lastname == null;
forms.Employee.jobgroup == "13%";
forms.Employee.controller.search();

You’re doing a comparison ‘==’ instead of setting a value ‘=’
Try this:
forms.Employee.controller.find();
forms.Employee.psname = “!^”;
forms.Employee.lastname = “^”;
forms.Employee.jobgroup = “13%”;
forms.Employee.controller.search();

Thanks Maarten,
I appreciate you straightening me out. That’s what it was… Brain Freeze on my part. This is a terrific product and the support I get from you guys is phenomenal.

Thanks again.

Graham