AppendQuery (Object)

Description:

Represents an individual query object in an appended query.

Syntax:

ActiveDocument.Sections["Query"].AppendQueries[1].Remove()
ActiveDocument.Sections["Query"].AppendQueries[1].Name=String
ActiveDocument.Sections["Query"].AppendQueries[1].UnionController=BqUnionController

Example:

This example shows how to build an appended query using the Add() method to create a new query, add a limit to it, and associate the UnionController property with the Union All type:

ActiveDocument.Sections["Query"].AppendQueries.Add()
var newQuery = ActiveDocument.Sections["Query"].AppendQueries.Item(2)
//update new query here with request line items, filters and controller setting
ActiveDocument.Sections["Query"].AppendQueries["Query2"].Requests.Add("Table1", "Item1")
var newLimit = ActiveDocument.Sections["Query"].AppendQueries["Query2"].Limits.CreateLimit("Stores.Store_Name")
newLimit.Operator = bqLimitOperatorContains;
newLimit.LimitValueType= bqLimitValueTypeCustom;
newLimit.CustomValues.Add("B");
newQuery.Limits.Add(newLimit);

ActiveDocument.Sections["Query"].AppendQueries["Query"].UnionController = bqUnionAll;

Collections

Limits As Limit, :Requests As Requests

Constants:

The AppendQuery (Object) references the UnionController property which uses BqUnionController constant group. The BqUnionController consists of the following values: