Extending a search

I’m unclear on the syntax required for extending a search.

controller.find();
user_name_lc = globals.gname.toLowerCase();
var recordCount = controller.search();

If recordCount > 0 then I want to search these records whether
any of them have any content in the field seven_id.

Assistance appreciated.

Why don’t you do this:

ontroller.find(); 
user_name_lc = globals.gname.toLowerCase(); 
seven_id = whatever_you_want;
var recordCount = controller.search();

When there’s a match I’m also looking for voidness in the seven_id field.

The following definitely does not work.

controller.find();
user_name_lc = globals.gname.toLowerCase();
seven_id = '' ;
var recordCount = controller.search();

Page 38 of the Developer’s manual talks about doing a find within a find, but offers only the following for guidance.

//extends the current foundset
controller.search(false,false);

My experiments have come up empty. Anyone have clarification of the required syntax?

So you are looking for records where field ‘seven_id’ is empty?

And that field sever_id is that nullable? If so, and your field is null you won’t find anything. You need to give it a value ‘’ by default…[/code]

IT2BE:
So you are looking for records where field ‘seven_id’ is empty?

And that field sever_id is that nullable? If so, and your field is null you won’t find anything. You need to give it a value ‘’ by default…[/code]

Are you saying that if the field seven_id is of type Integer then testing whether it has content or not just isn’t possible? Please confirm.

No, that’s not what I am saying.

I am saying that if the field you search for doesn’t have any value (NULL) you won’t find it. You then need to set it to, in the case it is an integer, -1 or 0 or whatever or find another way to search for it…

IT2BE:
No, that’s not what I am saying.

I am saying that if the field you search for doesn’t have any value (NULL) you won’t find it. You then need to set it to, in the case it is an integer, -1 or 0 or whatever or find another way to search for it…

I tried that originally, which is why I posted to the forum. Does not work in this case.

I’m looking for records where user_name_lc matches globals.gname.toLowerCase() AND that same record’s seven_id field happens to be empty.

I suspect the reason your two step code is not working is because Servoy is looking for either to match, not match within.

According to page 38 of the documentation you can do a subsequent search within the found set. However the required syntax isn’t clear.

Appreciate your help. Perhaps someone at Servoy has some answers to this one.