Hello Dojo Community ! ,
I find myself at a juncture where your collective expertise would be immensely valuable. I am currently working on an automation process that comprises both a correlation rule and an automation script. While I have successfully configured the correlation rule, I am facing a challenge in the latter part of the automation script.
The objective of this automation script is to dynamically identify alarming elements and extract their parameters. Subsequently, it needs to extract specific values from another element referred to as the 'Resource Manager.' These values are crucial for a subsequent calculation, which serves as a critical condition for advancing the automation process.
To help pinpoint where the issue lies, I have implemented 'try' and 'catch' statements. However, these are temporary placeholders and will be removed once the core problem is resolved.
The primary question that I would humbly request your assistance with is whether I am employing the correct method to reference the second element ('Resource Manager') accurately. Moreover, I seek guidance on how to efficiently retrieve parameter values from this second element and carry out the necessary calculations.
If it's possible to extend the initial dynamic search mechanism to encompass the search for parameters from the second element, that would be particularly advantageous.
Your expertise and guidance in this matter would be immensely appreciated. I am eager to learn from the wealth of knowledge within the Dojo Community and resolve this challenge.
Thank you in advance for your support and insights.
A B M
Hi A B M,
for the dynamic search of the second element if I understood correctly you could get all primary keys and then loop through them to get the value you want.
string primaryKeys = rn.GetTablePrimaryKeys(21104);
I don't know how the table is but for the value you have here I think is wrong:
var SapIs = rm.GetParameter(21104, "Display Key [IDX]");
Because the DisplayKey or Primary Key is expected.
See the attached picture for Referance and also the code to get the value:
var SapIs = rm.GetParameter(21104, "_Total:0");
the above code will get the value from column 21104 and row with the value _Total:0
I hope this helps.