LastResult Property
General info
Label |
Last Result |
Description |
Result of last execution. |
Data type |
String |
Type |
Regular |
Code |
5368 |
Symbolic name |
MODEL_PROP_LASTRESULT |
Lua access code |
syslib.model.properties.LastResult |
Available since |
1.52 |
- Parent properties
Attributes
| Name | Tooltip |
|---|---|
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_VOLATILE | The property exists during runtime of the service only and is not saved to the image. |
| PROP_PERSISTABLE | The value is persisted and searchable via SQL Catalog. |
Examples
Read from or write to the LastResult property.
-- Read from the LastResult
syslib.getvalue("<OBJECT FULL PATH>.HMDiagnostics.LastResult")
-- Write to the LastResult
syslib.setvalue("<OBJECT FULL PATH>.HMDiagnostics.LastResult", "new value")
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the LastResult
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.HMDiagnostics.LastResult"));
// Write to the LastResult
Result result = sli.WriteValue(sc, new WriteItem("new value", "<OBJECT FULL PATH>.HMDiagnostics.LastResult"));