Tuesday, March 15, 2016

How to override form datasource with another query

You can override form datasource with another (filtered) query.

You can put the code in datasource.executeQuery()

public void executeQuery()
{
    FormDataSource fds;
    ;
    //info(strFmt('1--%1', this.query().toString()));
    queryClass.executeQuery();
 
    fds = this.formRun().dataSource();
    fds.query(queryClass.parmQuery());
 
    //info(strFmt('1.1--%1', fds.query().toString()));
    //info(strFmt('2--%1', queryClass.parmQuery().toString()));
    super();
}

Where the "queryClass" is a class that create a filtered query.

No comments:

Post a Comment