Create getConfigValue

This commit is contained in:
John Bowdre 2022-06-14 08:45:39 -05:00 committed by GitHub
parent c500428048
commit 641cc352ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
/*
JavaScript: getConfigValue action
Retrieves the configuration element attribute value for a given key.
Inputs: path (string), configurationName (string), variableName (string)
Return type: string
*/
var configElement = null;
for each (configElement in Server.getConfigurationElementCategoryWithPath(path).configurationElements) {
if (configElement.name.indexOf(configurationName) === 0) { break; };
}
var attribValue = configElement.getAttributeWithKey(variableName).value;
return attribValue;