Latest News

the latest news from our team

Set Value from a Keyed Declared Constant

A Keyed Declared Constant from an eFORMzCfg_User.xml file provides the value for this Variable Function.

The form of a declaration is:

<KeyedConstant Name=“OrderNbrLabels”>
 <Entry Key=“EN”>
 <![CDATA[Order Number]]>
 </Entry>
 <Entry Key=“FR”>
 <![CDATA[French Order Number]]>
 </Entry>
 </KeyedConstant>

If this Function is used in a number of Projects to refer to the same Keyed Declared Constant, when the Keyed Declared Constant must change, only the eFORMzCfg_User.xml file needs to be modified, not each Project.

Note: Changes to the eFORMzCfg.xml will get overwritten as this file is updated or overwritten on upgrades and installs.

Sample: Language Substitution

1. Add another Variable by position and enter ‘OrderNbrLabel1’ in the Name field.
2. Right click the Variable and select Add Function > Set value from a keyed declared constant.
3. Select the ‘OrderNbrLabels’ Keyed Declared Constant which was declared in the eFORMzCfg_Translations.xml. The Key Value should should be the Language Variable. The Keyed Constant is as follows:

<KeyedConstant Name=“OrderNbrLabels”>
 <Entry Key=“EN”>
 <![CDATA[Order Number]]>
 </Entry>
 <Entry Key=“FR”>
 <![CDATA[French Order Nbr]]>
 </Entry>
 <Entry Key=“GE”>
 <![CDATA[German Order Number]]>
 </Entry>
 </KeyedConstant>

The two-letter language code from the incoming data file will be picked up by the Language Variable. This is the Key Value, or the ‘Entry Key.’ For example, if the language code is ‘FR’ then the value of the ‘OrderNbrLabel1’ Variable will be the French Order Number.

Load Variable From a Keyed Declared Constant Pre-condition Procedure

1. Add another Variable by position and enter ‘OrderNbrLabel2’ in the Name field.
2. Right click the Form and select Add Pre-condition Procedure > Load Variable from a Keyed Declared Constant.
3. Enter a value for the Name field and select the System Variable ‘N/A’ from the Use variable drop-down menu.
4. Select the ‘OrderNbrLabels’ Keyed Declared Constant which was declared in the eFORMzCfg_Translations.xml. The Key Value should should be the Language Variable. The Variable should be the ‘OrderNbrLabel2’ Variable. The Keyed Constant is as follows:

<KeyedConstant Name=“OrderNbrLabels”>
 <Entry Key=“EN”>
 <![CDATA[Order Number]]>
 </Entry>
 <Entry Key=“FR”>
 <![CDATA[French Order Nbr]]>
 </Entry>
 <Entry Key=“GE”>
 <![CDATA[German Order Number]]>
 </Entry>
 </KeyedConstant>

The two-letter language code from the incoming data file will be picked up by the Language Variable. This is the Key Value, or the ‘Entry Key.’ For example, if the language code is ‘FR’ then the value of the ‘OrderNbrLabel2’ Variable will be the French Order Number.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code