<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/td/onlinemanual/000433" xml:lang="en">
   <Header>
      <Title>CRM – examples
		of selection expressions</Title>
      <Keyword type="header" order="d1e1644412">
         <Level1>CRM</Level1>
         <Level2>examples of selection expressions</Level2>
      </Keyword>
   </Header>
   <AimSection>
      <Paragraph>If you create a selection expression in the <Link href="/baanerp/td/smi/tdsmi0170m000" role="session">Selections (tdsmi0170m000)</Link> session, you use the Text Editor to create an
		expression.</Paragraph>
   </AimSection>
   <GeneralSection>
      <SectionTitle>Examples of alphanumeric expressions</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="2">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">(R, color) = "red"</TD>
               <TD rowspan="1" colspan="1">attribute is
				alphanumeric</TD>
            </TR>
            <TR no="2" isLast="true">
               <TD rowspan="1" colspan="1">tccom100.bpid = "JOHNSON"</TD>
               <TD rowspan="1" colspan="1">table field is
				alphanumeric</TD>
            </TR>
         </TBODY>
      </TABLE>
      <Paragraph/>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="2">
            <TR no="1" isLast="false">
               <TD rowspan="1" colspan="1">(R, contents) = 1</TD>
               <TD rowspan="1" colspan="1">attribute is
				numeric</TD>
            </TR>
            <TR no="2" isLast="true">
               <TD rowspan="1" colspan="1">tccom110.umsp = 2</TD>
               <TD rowspan="1" colspan="1">table field is
				numeric</TD>
            </TR>
         </TBODY>
      </TABLE>
      <Paragraph/>
      <Paragraph>(R, contents) IN (10,100) (110,200)</Paragraph>
      <Paragraph>The value of the attribute must be greater than or equal to 10
		and less than or equal to 100 OR greater than or equal to 110 and less than or
		equal to 200.</Paragraph>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Examples of string expressions</SectionTitle>
      <TABLE border="1" borderstyle="default" space-and-orientation="indented-estimated">
         <TBODY noTR="7">
            <TR no="1" isLast="false">
               <TD width="23" rowspan="1" colspan="1">^</TD>
               <TD width="373" rowspan="1" colspan="1">beginning
				of the string</TD>
            </TR>
            <TR no="2" isLast="false">
               <TD width="23" rowspan="1" colspan="1">$</TD>
               <TD width="373" rowspan="1" colspan="1">end of the
				string</TD>
            </TR>
            <TR no="3" isLast="false">
               <TD width="23" rowspan="1" colspan="1">.</TD>
               <TD width="373" rowspan="1" colspan="1">any
				character</TD>
            </TR>
            <TR no="4" isLast="false">
               <TD width="23" rowspan="1" colspan="1">*</TD>
               <TD width="373" rowspan="1" colspan="1">0 or more times the
				previous character</TD>
            </TR>
            <TR no="5" isLast="false">
               <TD width="23" rowspan="1" colspan="1">()</TD>
               <TD width="373" rowspan="1" colspan="1">one of
				the characters between (), e.g. (abcd123) or (a-z)</TD>
            </TR>
            <TR no="6" isLast="false">
               <TD width="23" rowspan="1" colspan="1">(^)</TD>
               <TD width="373" rowspan="1" colspan="1">any sign other than, e.g.
				(^XYZ0-9)</TD>
            </TR>
            <TR no="7" isLast="true">
               <TD width="23" rowspan="1" colspan="1">""</TD>
               <TD width="373" rowspan="1" colspan="1">double quote
				within a string</TD>
            </TR>
         </TBODY>
      </TABLE>
      <Paragraph/>
      <List>
         <ListTitle>Examples</ListTitle>
         <ListItem>"abcdefg" IN "def" = TRUE</ListItem>
         <ListItem>"abcdefg" IN "^def$" = FALSE</ListItem>
         <ListItem>"abcdefg" IN "^a" = TRUE</ListItem>
         <ListItem>"abcdefg" IN "^b" = FALSE</ListItem>
         <ListItem>"abcdefg" IN "g$" = TRUE</ListItem>
      </List>
      <Paragraph>Alternative: (R,...) IN "abcde"</Paragraph>
      <Paragraph>Meaning: all attributes are checked for the presence of the
		string "abcde"</Paragraph>
   </GeneralSection>
   <GeneralSection>
      <SectionTitle>Priority in expressions</SectionTitle>
      <Paragraph>Arithmetic operators have a higher priority than relational
		operators. The latter have a higher priority than logical
		operators.</Paragraph>
      <Paragraph>The priority sequence for arithmetic operators is: * / ¥ +
		-</Paragraph>
      <Paragraph>The priority sequence for logical operators is: not and
		or</Paragraph>
      <Paragraph>Round brackets ("()") can be used to change the priority
		sequence for arithmetic and logical operators. For example, 3 + 4 * 5 = 23 and
		(3 + 4) * 5 = 35</Paragraph>
   </GeneralSection>
   <RelatedTopics>
      <SectionTitle>Related topics</SectionTitle>
      <RelTopic>
         <Link href="/baanerp/td/onlinemanual/000430" role="manual">
            <GUIRef href="/baanerp/crm" role="package">CRM</GUIRef> – Text Editor</Link>
      </RelTopic>
      <RelTopic>
         <Link href="/baanerp/td/onlinemanual/000422" role="manual">
            <GUIRef href="/baanerp/crm" role="package">CRM</GUIRef> – overview</Link>
      </RelTopic>
   </RelatedTopics>
</ManualTopic>