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

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;