Table of Contents

Method GetParameterByPrimaryKey

Namespace
Skyline.DataMiner.Automation
Assembly
SLManagedAutomation.dll

GetParameterByPrimaryKey(int, string)

Gets the value of the specified table cell using the primary key.

public virtual object GetParameterByPrimaryKey(int pid, string primaryKey)

Parameters

pid int

The ID of the column parameter.

primaryKey string

The primary key.

Returns

object

The value of the parameter or null if no row with the specified primary key was found.

Examples

Element element = engine.FindElement(400, 2000);
var value = element.GetParameter(1002, "1");

Remarks

If a column is hidden by an information template, the value for a cell of that column can no longer be retrieved by this method (null is returned). However, the value can still be retrieved using the GetParameter(int, string) method. Using the GetParameter method is therefore recommended.

Exceptions

DataMinerException

The specified parameter was not found.
-or-
The specified parameter is incorrect.

GetParameterByPrimaryKey(string, string)

Gets the value of the specified table cell using the primary key.

public virtual object GetParameterByPrimaryKey(string name, string primaryKey)

Parameters

name string

The name of the column parameter.

primaryKey string

The primary key.

Returns

object

The value of the parameter or null if no row with the specified primary key was found.

Examples

Element element = engine.FindElement(400, 2000);
var value = element.GetParameter("MyTableColumn", "1");

Remarks

The specified value for the name argument should be the value of the Description tag of the parameter and not the value of the Name tag.

Exceptions

DataMinerException

The specified parameter was not found.
-or-
The specified parameter is incorrect.