Method RowCount
RowCount(object)
Gets the number of rows present in the specified table.
int RowCount(object theArray)
Parameters
theArrayobjectThe ID of the table parameter or the input parameter table object.
Returns
- int
The number of rows in the table.
Examples
Retrieve row count of input parameter table 1000:
<QAction id = "500" encoding="csharp" triggers="500" inputParameters="1000">
using Skyline.DataMiner.Scripting;
public class QAction
{
public static void Run(SLProtocolExt protocol)
{
object table = protocol.GetInputParameter(0);
int rowCount = protocol.RowCount(table);
////...
}
}
Remarks
- This a wrapper method for a NotifyProtocol type 195 NT_ARRAY_ROW_COUNT call.
- In case the protocol does not define a table with the specified ID, -1 is returned.
RowCount(int)
Gets the number of rows present in the specified table.
int RowCount(int tableId)
Parameters
tableIdintThe ID of the table parameter.
Returns
- int
The number of rows the table contains. If the table was not found, a value of -1 is returned.
Examples
Retrieve row count of table by specifying the ID of the table parameter:
using Skyline.DataMiner.Scripting;
public class QAction
{
public static void Run(SLProtocolExt protocol)
{
int rowCount = protocol.RowCount(1000);
//// ...
}
}
Remarks
- In legacy DataMiner versions prior to DataMiner 10.1.1 (RN 27995), this method was defined as an SLProtocol extension method in the NotifyProtocol class.
- This a wrapper method for a NotifyProtocol type 195 NT_ARRAY_ROW_COUNT call.
- In case the protocol does not define a table with the specified ID, -1 is returned.