Conditions (daxch0114m000)
Use the Conditions (daxch0114m000) session to list the available conditions for an exchange scheme. Conditions are used to affect the import or export of data.
Conditions are used in the generated scripts to guard an action to supply a value for a table field during an import. For example the action to
or . Or to supply a value for an ASCII field during an export.To write conditions in LN 3GL code, you must use the LN text editor. You only must write the body of the function because the script generators add the function header and enclosing braces automatically. To learn more about the LN 3GL code, see the Programmers Manual.
If you use a condition as a guard action, then the return value is expected to be a Boolean true or false. This type of condition is used at the table-relation level to control actions in regard to the entire record. It is used at the field level to control the concept of overwrite. Five such conditions are available, all of which control aspects of the import process. Four of these conditions are included in the Table Relations (Import) (daxch0521m000) session and the fifth is included in the Field Relations (Import) (daxch0522m000) session.
The
menu contains these options:-
Performs a syntax check. If the condition script is written and the check is successfully completed, then Script and Syntax OK check boxes are automatically selected.
(Ctrl+Shift+G): -
Starts the Parameters by Condition (daxch0113m000) session.
(Ctrl+F1):
Predefined functions and variables are available in the Predefined Functions/Variables (daxch0510s000) session.
Conditions are used in the table and field relations:
- Set the conditions at table level with the Table Relations (Import) (daxch0521m000) session and the Table Relations (Export) (daxch0531m000) session.
- Set the conditions on field level with the Field Relations (Import) (daxch0522m000) session and the Field Relations (Export) (daxch0532m000) session.
- Define a unique condition code, description, and condition type.
- Define the corresponding domain for conditions with the Enumerate and Set condition type.
- Click on the toolbar to write the condition script.
- On the appropriate menu, click to perform a check.