Limit.getSelection Method
Puts the list of SelectedValues from a Limit into an array.
[object.]getSelection ()
Arguments
- object
- Required. A Limit object.
Return Value
The getSelection function returns an array of zero or more elements containing the string value(s) of the Items in object.SelectedValues.
Remarks
The following example uses Limit.getSelection Method to determine how many values are
in a ListBox:
if (ActiveDocument.QueryInProcess == "Q-Expenditures") {
var arr = ActiveDocument.Sections["Q-Budget"].Limits["Region"].getSelection();
var oTo = ActiveDocument.Sections["Q-Expenditures"].Limits["Region"];
oTo.setSelection(arr);
}
if (ActiveDocument.QueryInProcess == "Q-Expenditures") {
var oFrom = ActiveDocument.Sections["Q-Budget"].Limits["Region"];
var oTo = ActiveDocument.Sections["Q-Expenditures"].Limits["Region"];
oTo.setSelection(oFrom);
}
Requirements
ActiveDocument.loadObjectMethods() must be run after the limit
object is created and before this object method is used.
|