Language Reference Guide : System Classes : MethodObject Class : FetchTaggedValue Method
 
Share this page          
FetchTaggedValue Method
The FetchTaggedValue method returns the TaggedValue associated with the first occurrence of this tag name or row number in the TaggedValues array of this method or any same-named methods in its superclasses.
If the first occurrence is a superclass, the classname parameter is set to the name of that class and returned byref, and the property parameter is set to the MethodObject containing that tag and returned byref.
This method has the following syntax:
TaggedValue = MethodObject.FetchTaggedValue(tag = varchar(256) |
          row = integer
          [, classname = Byref(varchar(32))]
          [, property = Byref(MethodObject)], item = Object)
This method has the following parameters:
tag
(Either this parameter or row is required.) (Required) Specifies the name of the tag to be stored or accessed in the TaggedValues array.
If an Item parameter is supplied, the tag name must be suffixed by a subtag, delimited from the main tag name by the "#" character. This subtag is used to uniquely identify and access the object item being stored. If the specified subtag has already been used, the supplied item will replace whatever object was previously stored using that subtag; if the supplied item is a null, the subtag entry will be deleted.
For example, if a tagged value with tag name "test" has two objects (items) stored, the first with subtag "one", the second with subtag "two", the following code retrieves the second object:
myAppSource.FetchTaggedValue(tag='test#two', item=Byref(myseconditem));
Note:  The "&" character is reserved. Use of either "#" and "&" within tag or subtag names leads to unpredictable results.
For more information about how multiple items may be stored for a tagged value, see the RemoveTaggedValue Method.
row
(Either this parameter or tag is required.) Specifies the row number in the TaggedValues array.
classname
Specifies the classname. If classname is provided as a byref string, this string will be set to the classname of the ClassSource to which the MethodObject owning the identified TaggedValue actually belongs (this may be a superclass of the caller's userclass).
property
Specifies a property of the method. If provided as a byref variable, this will be set to the method object to which the identified TaggedValue belongs.
item
Specifies an object to be stored as one of the KeyedItems in the tagged value being created or changed.
This method returns a TaggedValue, or 0 if the entry for this tag or index is not present.