<turbo-stream action="update" target="wiki_card"><template>
<h1>Filtering with Microsoft Dynamics AX</h1>
<p>Filtering on the source system is an efficient way to retrieve records from a specific table based on the conditions that you have defined under<strong> Filters Source (delimitations)</strong> section. Also, the filters are a great way to control the data that will be transferred to the destination system. <br><br>Note: When setting up any filter, the source field must be added in the field <strong>FIELD NAME</strong>. Then, the actual filter must be added in the field<strong> FILTER</strong> where the format should be : <strong>Field Name + SQL operator + value/expression </strong>(see examples below).<br><br>Here are the most commonly used SQL operators and examples when querying Microsoft Dynamics AX (or the underlying database tables in SQL Server):<br><br><br></p><ul><li><strong>Not Equal To</strong> ( denoted as <code>&lt;&gt;</code> , <code>!=</code> or <code>NE</code>) is used to compare values in a database table and retrieve rows where a specific column's value does not match a given criteria or to exclude certain records when reading from the source system.</li></ul><blockquote>Type &lt;&gt;'2'</blockquote><p><br></p><ul><li><strong>IN</strong> - The <code>IN</code> operator allows you to retrieve only the records that meet that criteria. If it is being used in combination with the <code>WHERE</code> clause, you are pointing to a different table available in your source system. Your current table and the referenced table have in common the field that the filter is set on.&nbsp;</li></ul><blockquote>ProductNumber IN (SELECT ProductNumber FROM Products WHERE Name &lt;&gt; '')</blockquote><p>OR&nbsp;<br><br></p><blockquote>ProductNumber IN ('CS-U012','CZ-U019')</blockquote><p><br></p><ul><li><strong>NOT IN</strong> - By using the NOT keyword in front of the IN operator, you return all records that are NOT any of the values in the list.</li></ul><blockquote>ProductNumber NOT IN ('CS-U012','CZ-U019')</blockquote><p><br></p><ul><li><strong>Equal To</strong> (denoted as <code>=</code> or <code>EQ</code>) is used to filter on a specific record on the source system.</li></ul><blockquote>ItemId = 'M1-1234'</blockquote><p><br></p><ul><li><strong>LIKE</strong> - The LIKE operator is used to search for a specified pattern while reading data from a source system. The % wildcard represents any number of characters, even zero characters. To return records that starts with a specific letter or phrase, add the % at the end of the letter or phrase. To return records that ends with a specific letter or phrase, add the % at the beginning of the letter or phrase.To return records that contains a specific letter or phrase, add the % both before and after the letter or phrase.If no wildcard is specified, the phrase has to have an exact match to return a result.</li></ul><blockquote>tag_number LIKE 'HX%'</blockquote><ul><li><strong>NOT LIKE</strong> - The same as the LIKE operator, it searches for the specified pattern while reading from the source system.</li></ul><blockquote>tag_number NOT LIKE 'HX%'</blockquote>
</template></turbo-stream>

<turbo-stream action="replace" target="meta_description"><template><meta content='Filtering with Microsoft Dynamics AX' id='meta_description' name='description'></template></turbo-stream>
<turbo-stream action="replace" target="meta_keywords"><template><meta content='Filtering with Microsoft Dynamics AX' id='meta_keywords' name='keywords'></template></turbo-stream>
<turbo-stream action="update" target="meta_title"><template>Filtering with Microsoft Dynamics AX - MyRapidi Wiki</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
