SelectedValues (Collection)

Member of:

LimitValues object

Description:

Represents selected limit values.

Note:

Because values are called from database, the Add (Method) is unavailable for the AvailableValues (Collection). For “CustomValues (Collection), the Add (Method) adds a value to the list. For the SelectedValues (Collection), the Add (Method) adds a value to the selected list. The AddAll (Method) of the SelectedValues (Collection) selects all values of AvailableValues or CustomValues (Collection).

Tip:

All collections have the “Item(NameOrIndex)” method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example:

This example shows how to take every value from the AvailableValues (Collection) and add them to the SelectedValues (Collection). This is essentially the same as performing a select all values and transferring the selection in the Limit User Interface:

LimitCount = ActiveDocument.Sections["Results"].Limits[1].AvailableValues.Countfor (i=1;i<=LimitCount;I++){MyVal = Add(ActiveDocument.Sections["Results"].Limits[1].AvailableValues[i]ActiveDocument.Sections["Results"].Limits[1].SelectedValues.Add(MyVal))}

Methods:

Add(Value ValueItem), AddAll(), Item(Number Index), RemoveAll()

Properties:

Read-only: Property Count as Number,