Returns the index associated to a SDT item in a SDT collection.
IndexOf( Item )
Variable based on a SDT item.
It returns the index (numeric value) associated with the Item parameter element of an SDT collection.
In general, the IndexOf method of a SDT Collection is used in conjunction with the Remove method. Once you have the desired index (position in the SDT), you could use the associated Remove method
&index = &sdtCollection.IndexOf(&sdtCollection.CurrentItem)
Structured Data Type Methods
This method works with the elements references and not with their contents. This implies that if a variable with a list of SDT is received as a parameter, and a temporary variable is loaded with an item content, IndexOf will return 0 (empty) since this reference is not within the list. It can be useful only the moment the list is loaded.