Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Macro expression $.cfgfile

This macro expession represents the value stored in the configuration file (XML or INI). See: XML and INI configuration files structure description for $.cfgfile macro expression
 
Syntax:

$.cfgfile("id","value")

id = the compound value identifier (e.g. "a/b/c")
value = (optional) the backup value in case the referred value is not found

Obsolete syntax of macro expression: $cfgfile:id,value

 
Example:
1) $.cfgfile("config/data/webportnumber",0)

- Get the value /data/webportnumber from the configuration file referred with the config identifier.

2) $.cfgfile("config/data/webportnumber",80)

- Get the value /data/webportnumber from the configuration file referred with the config identifier. If the value is not found in the file, the backup value 80 is returned.

3) $.cfgfile("config/data/boiler1/webportnumber",0)

- Obtaining the value of /data/boiler1/webportnumber from configuration XML file registered as config identifier. The expression allows to read the value from arbitrary hierarchical level (the boiler1 level is extra here).


Configuration items in extended value editor:
Value identifierDefines the compound value identifier, e.g.: config/data/portnumber.
Enter substitutional valueCan be used to define substitutional value that will be used in case the referred value is not found
The backup valueDefines the substitutional value
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice