Hi
This is a method for filtering finish status records in project table, When Show project is Active - All records will come except finished one. When Show project is All - All projects will come.
public static void applyProjectStateFilter(FormDataSource _formDataSource, int selection)
{
QueryBuildRange qbr = SysQuery::findOrCreateRange(_formDataSource.query().dataSourceTable(tableNum(ProjTable)), fieldNum(ProjTable, Status));
if (ProjProjectsListCustomFilterHelper::checkProjActiveAll(selection))
{
qbr.value(SysQuery::valueUnlimited());
}
else
{
// Active = all non-completed projects
qbr.value(SysQuery::valueNot(ProjStatus::Completed));
}
_formDataSource.executeQuery();
}
so as per the code, I want to add one more value , so that with Active status- all records should come except finish and user1 status.
qbr.value(SysQuery::valueNot(ProjStatus::User1));
public static void applyProjectStateFilter(FormDataSource _formDataSource, int selection)
{
QueryBuildRange qbr = SysQuery::findOrCreateRange(_formDataSource.query().dataSourceTable(tableNum(ProjTable)), fieldNum(ProjTable, Status));
if (ProjProjectsListCustomFilterHelper::checkProjActiveAll(selection))
{
qbr.value(SysQuery::valueUnlimited());
}
else
{
// Active = all non-completed projects
qbr.value(SysQuery::valueNot(ProjStatus::Completed));
qbr.value(SysQuery::valueNot(ProjStatus::User1));
}
_formDataSource.executeQuery();
}