<turbo-stream action="update" target="wiki_99_subpage_152_info"><template>
<h1>Copy(data, from, length);</h1><p>Using the Copy function, you can copy a section of a text by specifying the minimum and maximum of that value. This formula is useful when you have a field length limitation in the destination system.</p><p>&nbsp;</p><p><strong>Example 1:<br><br></strong>The value of the field "<strong>Name</strong>" is: <strong>Rapidi A/S<br><br></strong><code>##COPY("Name", 0, 6)</code><br><br>It will transfer the first 6 characters from the source field "<strong>Name</strong>". And the result value will be <strong>Rapidi</strong> ( since length is set up to a maximum of 6 characters.<br><br><code>##COPY("Name", 7, 9)</code><br><br>It will transfer characters from position 7 to 9. In this scenario, the result value will be <strong>A/S</strong> since the length is between the last 7 and 9 characters.&nbsp;<br><br></p><p><strong>Example 2:</strong></p><blockquote>In this example the FieldType in the Source and Destination fields does not match:Source Fieldtype = VarChar: Value = KKK1243000Destination FieldType = Integer: ##COPY(FieldName, 3, 7);Returns the value = 1243000which is compatible with the integer datatype. In some cases you need to add a TOINTEGER formula to ensure that values are compared correctly during transfer, or if you need to calculate on the field: ##TOINTEGER(COPY(FieldName, 3, 7))</blockquote><p><strong>Example 3:</strong></p><blockquote>&nbsp;The formula ##COPY("BillingCity",0,29) will transfer the first 29 characters from the source field "BillingCity".&nbsp;</blockquote>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
