Using WHERE IN Clauses in Parsed Restrictions

In Archibus V18.2 and later, parsed restrictions can support the "IN" operator. This applies to regular views and to paginated report views.

If the list of values is known when the view is designed, then define the list in the .AXVW file:

<restriction type="parsed">
<clause table="activity_log"
name="status" op="IN" value="COMPLETED, COMPLETED-V"/>
</restriction>

If the list of values is only known at runtime (for example, when the list is from a multiple row selection made in the client-side grid control), then you can add this “WHERE IN” style parsed restriction clause to the view restriction with script like the following:

var values = [];
for (...) {
values.push(someValue);
}
restriction.addClause(..., values);

This invocation passes the elements as an array and is equivalent to:

restriction.addClause('activity_log.status, ['COMPLETED', 'COMPLETED-v'], 'IN');

Note: String values in Java Script use single quotes ('COMPLETED') while string values in AXVW do not (COMPLETED).

See Also

Restricting a Paginated Report from a Console with Multiple Filter Fields