Injecting Parsed Restrictions into Complex SQL Queries

The ${restriction.sql} expression can be used in interactive views as well as in paginated reports.

To inject parsed restriction into complex SQL queries:

  1. Use the ${restriction.sql} expression in the custom SQL query in the AXVW file.
  2. Apply a parsed restriction as usual – via a <command>, a JavaScript Ab.view.Restriction object, or URL parameters.

For example:

var restriction = new Ab.view.Restriction();
restriction.addClause('activity_log.status’, 'OPEN%', "LIKE");
restriction.addClause('bl.name’, '%quarters%', "LIKE");
myPanel.refresh(restriction);

See Also

Restricting Paginated Reports Using Restrictions to Complex SQL Queries