Doubt with filtering foundset with svy_nav_showLookupWindow

Hello, I want to filtrate a foundset to the lookup window. Actualy y put in the parameter _methodToAddFoundsetFilters the name of the method addFilters. This is the method:

/**
 * @param {JSFoundset<db:/qclab/productos_vers>} fs
 * 
 * @return {JSFoundset}
 * 
 * @properties={typeid:24,uuid:"0FE9F697-E935-4A70-8CCD-845D2158026A"}
 * @AllowToRunInFind
 */
function addFilters(fs) { 
	fs.loadAllRecords();
	fs.find();
	fs.producto_vers_id = 2;
	fs.search();
	
	return fs;
}

I think this is right, but when i run the lookup window, fill al the records and not only the producto_vers_id = 2. But if I comment this line:

	//load the records
	_fs.loadAllRecords()

In the function svy_nav_lkp_getFoundset, the filter works perfectly. Any sugestion? I do anything wrong?

Hi,

It is to addFoundsetFilters, not to do a find.

In your case:

fs.addFoundSetFilterParam('producto_vers_id','=',2)
return fs;

Okey, a los of thanks! It’s possible in the next version put a bit of more information about this in the pdf of navigation or inside the function of the lookup? Thanks for all!

And if I want make some of this:

	fs.addFoundSetFilterParam('producto_vers_clase','=',1+"||"+2);

what if the correct form, for an OR condition between two values?