Represents a custom list associated with a limit. Users open limits to select values.
Retrieve a custom limit value using the CustomValue (Collection).
The Add (Method) is unavailable for the AvailableValues (Collection) because the values are fetched from the database. For the 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). |
All collections have a method named “Item(NameOrIndex).” This is the default method for all collections and returns an item in the collection at a particular index or with a specific 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") |
This example shows how to add all AvailableValues (Collection) values to the SelectedValues (Collection). This is the same as performing a select all values and transferring the selection in the Limit dialog:
LimitCount = ActiveDocument.Sections["Results"].Limits[1].AvailableValues.Count for (i=1;i<=LimitCount;I++) { MyVal = Add(ActiveDocument.Sections["Results"].Limits[1].AvailableValues[i] ActiveDocument.Sections["Results"].Limits[1].SelectedValues.Add(MyVal) }
Add(Value ValueItem), AddAll(), Item(Number Index), RemoveAll()