Method GetDisplayValue
- Namespace
- Skyline.DataMiner.Automation
- Assembly
- SLManagedAutomation.dll
GetDisplayValue(int, string)
Gets the display value that corresponds with the specified raw value of the specified parameter.
public virtual string GetDisplayValue(int pid, string rawValue)
Parameters
pidintThe ID of the parameter.
rawValuestringThe raw value for which the display value has to be determined.
Returns
- string
The display value that corresponds with the specified raw value.
In case the parameter was not found, the specified value inrawValueis returned.
In case the parameter was found, but the raw value is not specified in the parameter, the specified value inrawValueis returned.
Examples
var dummy = engine.GetDummy("dummy1");
string displayValue = dummy.GetDisplayValue(1000, "1");
Remarks
Used with parameters defining discrete entries to retrieve the display value (e.g. "Main") for a specific value (e.g. “1”).
GetDisplayValue(string, string)
Gets the display value that corresponds with the specified raw value of the specified parameter.
note
Please use an overload that takes the parameter ID instead to prevent issues in case the parameter Description changes.
[Obsolete("Use overloads with parameter ID instead of name.")]
public virtual string GetDisplayValue(string name, string rawValue)
Parameters
namestringThe name of the parameter.
rawValuestringThe raw value for which the display value has to be determined.
Returns
- string
The display value that corresponds with the specified raw value.
In case the parameter was not found, the specified value inrawValueis returned.
In case the parameter was found, but the raw value is not specified in the parameter, the specified value inrawValueis returned.
Examples
var dummy = engine.GetDummy("dummy1");
string displayValue = dummy.GetDisplayValue("MyDiscreteParameter", "1");
Remarks
Used with parameters defining discrete entries to retrieve the display value (e.g. "Main") for a specific value (e.g. “1”).