Thursday, March 22, 2012


To filter the data display out. we can use addRange method.:-

 this.query().dataSourceTable(tablenum(Table)).addRange(fieldnum(Table, TableField)).value(Value);

If want to filter the record with a empty string:-

 this.query().dataSourceTable(tablenum(table)).addRange(fieldnum(table, tablefield)).value(SysQuery::valueEmptyString());

If want to filter the record with not empty string:-

this.query().dataSourceTable(tablenum(table)).addRange(fieldnum(table, tablefield)).value(SysQuery::valueNotEmptyString());
If want to filter the record with enum value:-

   this.query().dataSourceTable(Tablenum(table)).addRange(fieldnum(table, tablefield)).value(SysQuery::value(AvPurchType::None));


If want to filter the record with not equal A:-

this.query().dataSourceTable(tablenum(table)).addRange(fieldnum(table, tablefield)).value(SysQuery::valueNot('A'));

If want to filter the record with Range:-

this.query().dataSourceTable(tablenum(table)).addRange(fieldnum(table, tablefield)).value(Queryrange("1","100"));

 
After filter, disable the find @ Ctrl+G method to not allow the user change the record selection setting.

 this.query().dataSourceTable(tablenum(table)).addRange(fieldnum(table, tablefield)).status(1);


*Note above code must write before super();

if wish to arrange the data, you can amend the code below:-

this.query().datasourcetable(tablenum(AvVendorRoleTable)).addOrderByField(fieldnum(AvVendorRoleTable, modifiedDateTime), SortOrder::Descending);





  

No comments:

Post a Comment