Bluestep JS Documentation
    Preparing search index...

    Class AdvancedQueryOptions

    Options for advanced queries.

    {
    * search: "AND a = b",
    * maxAgeMillis: 60000,
    * psAction: (ps) => {
    * ps.setString(1, "value");
    * ps.setObject(2, someObject);
    * return ps.getMaxIndex(); // Optionally return the number of parameters set or will be interally calculated by using the ps.getMaxIndex() method.
    * }
    * }
    Index

    Constructors

    Properties

    maxAgeMillis?: number

    Optional, defaults to -1 (no limit). If set, the query will us a maximum age for caching. Other factors may lower this limit. If set to 0, the query will not be cached.

    psAction?: (ps: DbViewPreparedStatement) => number | void

    Optional, used for prepared statements. If set, the query execute the psAction function. The psAction function will be called with the prepared statement and can set parameters on it. Returning a non null number will override the internal calcuation of the number of parameters used.

    whereClause?: string

    Allows for customization of backend query. The query segment will be injected into the WHERE clause of the query. It must begin with "AND" or "OR" and can contain any valid SQL syntax. This uses custom quote syntax to inject tables and fields into the query.

    "A" - Lookup By Form AltId:

    • AND A"SID=FormAltId".D"Field Name" = 'value'
    • OR A"SID=FormAltId"."Field Name" = 'value'
    • AND A"SID=AltId".formulaId = 'value'

    "C" - Lookup Table and Field By Field AltId:

    • AND C"SID=USERNAME" = 'value'

    "D" - Lookup By Display Name:

    • AND D"Display Name".D"Field Name" = 'value'
    • OR D"Display Name"."Field Name" = 'value'
    • AND D"Display Name".formulaId = 'value'

    "F" - Lookup By Formula Form Id:

    • AND F"name".lastName = 'value'

    Raw Table Name:

    • AND "basetable"."classid" = 111111
    • OR basetable.classid = 111111
    • AND ZZZ_DYNOTABLE_456.C3456 = 'value'
    • OR "zzz_dynotable_456"."c3456" = 'value'

    Invalid Examples:

    • invalid: AND D"Display Name".A"SID=USERNAME"
    • invalid: OR D"Display Name".F"SID=USERNAME"
    • invalid: AND F"name".A"SID=USERNAME"
    • invalid: OR F"name".F"SID=USERNAME"