GETRESOURCEALIAS
The GETRESOURCEALIAS function returns the resource alias value specified in a Resource Registry resource name file (.mrn).
- Syntax:
- resourcelib->GETRESOURCEALIAS (sinlge-text-expression, single-text-expression)
- Meaning:
- GETRESOURCEALIAS (single-text-expression, single-text-expression)
- Returns:
- A single text item
The GETRESOURCEALIAS function loads a Resource Registry resource configuration file and retrieves the specified alias value. The values are defined as part of the Global object in the .mrc file.
In the below example the resource configuration file is defined as:
<?xml version="1.0" encoding="UTF-8"?>
<ResourceCfg>
<Global>
<ResourceFile ActiveVirtualServer="test">Company.mrn</ResourceFile>
</Global>
</ResourceCfg>
The resource name file is defined as:
<?xml version="1.0" encoding="UTF-8"?>
<MRN>
<VirtualServerSet>
<VirtualServer>test</VirtualServer>
</VirtualServerSet>
<Resource>
<Name>company</Name>
<Value Server="test" encrypt="OFF">ABC</Value>
</Resource>
</MRN>
..when used as a part of this rule:
=resourcelib->GETRESOURCEALIAS("company.mrc","%company%")
In this scenario, the return value is "ABC".
When an absolute path is not defined in the location, the default location is the map directory.