//Add this to Class Declaration of a Form
public class FormRun extends ObjectRun
{
QueryBuildRange rangeTenant;
QueryBuildRange rangeAgreementId;
QueryBuildRange rangeAgreementJournalId;
QueryBuildRange rangeBuildingId;
QueryBuildRange rangeRentTransId;
QueryBuildRange rangePaymentDate;
QueryBuildRange qbr,qbr1,qbr2,qbr3;
}
//Add this to Datasource Execute Query(Eg :- NetPaymentHistory_ds)
public void executeQuery()
{
rangeTenant.value(TenantId.text() ? queryValue(TenantId.text())
:SysQuery::valueUnlimited());
rangeAgreementId.value(AgreementId.text() ? queryValue(AgreementId.text())
: SysQuery::valueUnlimited());
rangeAgreementJournalId.value(AgreementJournalId.text() ? queryValue(AgreementJournalId.text())
: SysQuery::valueUnlimited());
rangeBuildingId.value(BuildingId.text() ? queryValue(BuildingId.text())
: SysQuery::valueUnlimited());
rangeRentTransId.value(RentTransId.text() ? queryValue(RentTransId.text())
: SysQuery::valueUnlimited());
rangePaymentDate.value(PaymentDate.valueStr() ? queryValue(PaymentDate.valueStr())
: SysQuery::valueUnlimited());
super();
}
//Add this to Datasource init method (Eg :- NetPaymentHistory_ds)
public void init()
{
super();
this.query().dataSourceTable(tablenum(NetPaymentHistory)).clearDynalinks();
rangeTenant = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, TenantId));
rangeAgreementId = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, AgreementId));
rangeAgreementJournalId = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, AgreementJournalID));
rangeBuildingId = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, BuildingId));
rangeRentTransId = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, RentTransId));
rangePaymentDate = this.query().dataSourceTable(tablenum(NetPaymentHistory))
.addRange(fieldnum(NetPaymentHistory, PaymentDate));
// Enable caching of the document handling and note it display fields
//purchRFQTable_ds.cacheAddMethod(tablemethodstr(PurchRFQTable, showDocHandIcon));
}
// Add this to Each of the String Control Field
public boolean modified()
{
boolean ret;
ret = super();
NetPaymentHistory_ds.executeQuery();
return ret;
}