Hello guys,
In my custom form with a grid, I want to add a check box, and this check box when it is "checked" it will only show rows with status "Posted", Default will be not checked, so it is showing all statuses. How am I gong to achieve this ?
I have added the check box in my form, and then in code editor, for the Click method, I tried to write code, something like this :
[Control("CheckBox")]
class ShowPosted
{
public void clicked()
{
QueryBuildDataSource rangeDataSource;
QueryBuildRange criteriaShowPosted;
///
/// Execute and manage the filter pane and quick filter control queries.
///
Query initialQuery = new Query(My_Table_ds.query());
rangeDataSource = initialQuery.dataSourceNo(1);
if (this.checked())
{
criteriaShowPosted = SysQuery::findOrCreateRange(rangeDataSource, fieldnum(My_Table, Status));
criteriaShowPosted.value(queryValue(My_Status::Posted));
}
My_Table_ds.executeQuery();
}
}
Did I missed something ? or it is just not the way to do it ?
Thanks