How to filter a pipeline object based on filter screen values

Less than one minute read time.

We know that a LIST block can be filtered based on a standard filter screen block via

var filter = eWare.GetBlock("MyFilterBoxName");
var list = eWare.GetBlock("MyListName");
list.ArgObj = filter;

Can we filter a pipeline object in a similar fashion?

Unfortunately you cannot filter a pipeline object in a similar way. Instead you need to build the WHERE clause of the SQL that the pipeline is based on from values returned in the Request.Form object.

For example if your pipeline is based on an entity called project and your filter screen had a company field you might have code like the following to cause the pipeline to be filtered by the company field:

var SQLPipe='select count(proj_projectid) as a,'
+'proj_type from vProject'
+'where (proj_Companyid='+ Request.Form._HIDDENproj_companyid +') '
+'group by proj_type order by proj_type';
var ProjPipe=eWare.CreateQueryObj(SQLPipe);

For more information on creating a pipeline object, see Jeff's post here.