<turbo-stream action="update" target="wiki_card"><template>
<h1>SPLIT</h1>
<h1>SPLIT(data, integer[size] | character[split on character]);</h1>
<p>&nbsp;</p>
<h2>Overview</h2>
<ul>
<li>Used with Scatter to split 1 field into several records.</li>
<li>Some databases has a big textfield for comments in a Customer record, whereas e.g. Navision has a separate table with several comment records for each Customer.</li>
<li>To split the field Comment on a Customer record into a separate Comment table you need to setup a Scatter transfer on the Customer transfer.</li>
<li>On the Scatter transfer you then use the split formula in the fieldlist.</li>
</ul>
<blockquote>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr>
<td><strong>##SPLIT("Comment",'; ')</strong></td>
</tr>
</tbody>
</table>
<br> If a Comment field in the source record has a syntax where each comment is separated with ; the split formula will make a record for each comment.</blockquote>
<p>&nbsp;</p>
<p><strong><span>Example 1 (Example of a Scatter on a Customer transfer):</span></strong></p>
<blockquote>
<p><strong><span>Source Record:</span></strong></p>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr><span><strong><span>No.</span></strong></span><span><strong><span>Comment</span></strong></span></tr>
<tr>
<td>10008</td>
<td>'20082003 Credit Limit exceeded.; 23082003 Notification Sent.; 30082003 Account OK</td>
</tr>
</tbody>
</table>
<br>
<p><strong><span>Destination Record:</span></strong></p>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr><span><strong><span>No.</span></strong></span><span><strong><span>Line No.</span></strong></span><span><strong><span>Comment Line</span></strong></span></tr>
<tr>
<td>1008</td>
<td>1</td>
<td>20082003 Credit Limit exceeded.</td>
</tr>
<tr>
<td>1008</td>
<td>2</td>
<td>23082003 Notification Sent.</td>
</tr>
<tr>
<td>1008</td>
<td>3</td>
<td>30082003 Account OK</td>
</tr>
</tbody>
</table>
</blockquote>
<p><span><span>NOTICE THAT:</span></span></p>
<ul>
<li><span>The Field "Line No." is filled using the Auto Generate Key functionality on the Scatter transfer.</span></li>
<li><span>To do this you simply mark the checkbox on the Scatter, and map the destination field in the Scatter link list. In the source field syntax must be ##'-1'. Refer to the setup below:</span></li>
</ul>
<blockquote>
<p><strong><span>Scatter Setup:</span></strong></p>
<br>
<p><strong>Link List:</strong></p>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr><span><strong><span>Source Field</span></strong></span><span><strong><span>Dest. field</span></strong></span></tr>
<tr>
<td>No.</td>
<td>No.</td>
</tr>
<tr>
<td>##'-1</td>
<td>Line No.</td>
</tr>
</tbody>
</table>
<br>
<p><strong>Field List:</strong></p>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr><span><strong><span>Source Field</span></strong></span><span><strong><span>Dest. field</span></strong></span></tr>
<tr>
<td>No.</td>
<td>No.</td>
</tr>
<tr>
<td>##SPLIT("Comment",'; ')</td>
<td>Comment Line</td>
</tr>
</tbody>
</table>
</blockquote>
<p>&nbsp;</p>
<p><strong><span>Example 2:</span></strong></p>
<blockquote>
<table cellpadding="4" border="1" cellspacing="3">
<tbody>
<tr>
<td><strong>##SPLIT("Location"+IF(EQUALS("location2",''),'',':'+"Location2"),':')</strong></td>
</tr>
</tbody>
</table>
<ul>
<li>This formula will split Location 1 and 2 into two records if both fields have a value. In case the Location2 field is empty, only one record would be created.</li>
<li>If Location2 ='' then insert nothing after Value in Location. ('Location Value'+''</li>
<li>If Location2 is not empty then insert (Location Value+':''Location2 value')</li>
<li>If there is a value in the location2 field, a record is created where the values in location and location2 are separated by :.</li>
<li>Split will then work on that record and split it into 2.</li>
</ul>
</blockquote>
</template></turbo-stream>

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