Argument | Description | Types / Required |
name | The name of the symbol. | string
required |
serializationOptions | Options for how the symbol should be serialized. | object
not required |
You can use the
Logic.getSymbolValue action if you only want to work with the symbol's value, or
Logic.getSymbol if you want both the metadata and value. You can also use the
Symbol.getJson function to get a symbol's JSON metadata and value.
All symbols support the serialization of the symbol metadata. The following table describes the value-related serialization routines available for CSPro objects and contains links to the description of the
JSON representation for each object.
Documentation about JSON representations feature will come in a future release. In the meantime you can see if the documentation is updated at:
The action returns an object with the symbol's metadata.
The action throws an exception if any of its arguments are not specified in a valid form or if no symbol has the specified name.
function doSomethingWithExternalDictionary(dictionaryName) {
// proceed only if the symbol is an external dictionary
const dictionary = CS.Logic.getSymbolMetadata({
name: dictionaryName
});
if( dictionary.type != "Dictionary" || dictionary.dictionaryType != "external" ) {
throw new Error(`${dictionaryName} is not an external dictionary.`);
}
}