Okapi .NET Library

IFilterItem.GetCodeIndexFromID Method 

 [This is preliminary documentation and subject to change.]

Gets the index of a code with the given identifier and type.

[Visual Basic]
Function GetCodeIndexFromID( _ 
   ByVal p_nID As Integer, _ 
   ByVal p_nType As Integer _ 
) As Integer
[C#]
int GetCodeIndexFromID(
   int p_nID,
   int p_nType
);
[C++]
int GetCodeIndexFromID(
   int p_nID,
   int p_nType
);
[JScript]
function GetCodeIndexFromID(
   int p_nID,
   int p_nType
): int;

Parameters

p_nID
Identifier of the code to lookup.
p_nType
Type of the code to lookup

Return Value

Index of the code in the code map, or -1 if no match was found.

Remarks

Use this method to retrieve the mapping index of a given code. Be aware that the result of this function may be incorrect if you use it on an item that is currently being built because the index values may change when adding codes to the item.

See Also

IFilterItem Interface | Okapi.Library.Filter Namespace