<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/da/onlinemanual/000009" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">To use conditions in the exchange module</Title>
		<Keyword ContextSensitive="No"><Level1>Exchange condition script</Level1>
		</Keyword>
	</Header>
	<GeneralSection><Paragraph class="Default">The exchange process can be manipulated by using <Link href="/baanerp/da/glossary/glossary#000009" role="glossary">conditions</Link> at different levels in an <Link href="/baanerp/da/glossary/glossary#000003" role="glossary">exchange scheme</Link>.</Paragraph>
		<List><ListIntro>Conditions are used for two purposes:</ListIntro>
			<ListItem>To specify if records must be imported (true/false type condition).</ListItem>
			<ListItem>To calculate field values during export or import (value type condition).</ListItem>
		</List>
		<Paragraph class="Default">Conditions are used in table relations and field relations. Table relation conditions specify the conditions for adding, updating, or deleting rows during the import process. Field relation conditions are used to calculate field values during the import/export process.</Paragraph>
		<Paragraph class="Default">A condition is defined in a condition script using the text editor. The script contains ERP LN 4GL commands, that can include declarations, database actions, assignments, and conditions. Specific variables and functions are available for condition scripts. These variables are listed in the <GUIRef href="/baanerp/da/xch/daxch0510s000" role="session">Predefined Functions/Variables (daxch0510s000)</GUIRef> session.</Paragraph>
		<Paragraph class="Default">If conditions are used for data import, all the ASCII fields are already available for use in the script and contain the values from the current ASCII record.</Paragraph>
		<Paragraph class="Default">If conditions are used for data export, all the fields from the ERP LN table are available and contain the values from the current record of the ERP LN table.</Paragraph>
		<GeneralSection><SectionTitle>Duplicate command</SectionTitle>
			<Paragraph class="Default">If a condition is copied, the condition script is also copied. The condition script text is actually copied to a different text number. Therefore the new condition script can be changed without affecting the original script.</Paragraph>
		</GeneralSection>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000008" role="manual">To use parameters in a condition script</Link>
		</RelTopic>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000103" role="manual">Predefined functions, variables and libraries</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
