{"id":3602,"date":"2013-05-24T22:35:31","date_gmt":"2013-05-24T20:35:31","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=3602"},"modified":"2013-05-24T22:35:31","modified_gmt":"2013-05-24T20:35:31","slug":"orchestrator-data-manipulation-functions","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=3602","title":{"rendered":"Orchestrator Data Manipulation Functions"},"content":{"rendered":"<p>Orchestrator support a number of data manipulation functions. These functions can be used to manipulate string and \u00c2\u00a0convert it into a usable form. You can also perform simple arithmetic operations, such as calculating sums and differences, and performing division and multiplication operations. For a complete list of the functions that you can perform see <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/hh440537.aspx\">Technet<\/a>. One nice thing about these data manipulation functions is that you can combine them.<\/p>\n<p>Example, a simple text file<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3603\" alt=\"20130524_dataman01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman01-300x141.jpg\" width=\"300\" height=\"141\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman01-300x141.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman01.jpg 313w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>I use a Read Line activity to read the line, and I can then manipulate the data, in this figure I do that in a Send Platform Event activity<\/p>\n<p><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman02.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-3604\" alt=\"20130524_dataman02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman02-300x168.jpg\" width=\"300\" height=\"168\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman02-300x168.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2013\/05\/20130524_dataman02.jpg 765w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The result will be<\/p>\n<blockquote>\n<pre>John Connor,Skynet,555-123456<\/pre>\n<pre>John Connor<\/pre>\n<pre>John<\/pre>\n<pre>Jo<\/pre>\n<pre>JO<\/pre>\n<pre>555-123456<\/pre>\n<pre>555<\/pre>\n<pre>123456<\/pre>\n<pre>124011<\/pre>\n<\/blockquote>\n<p>First line is the text line as in the text file. Then it is<br \/>\nString divided on &#8220;,&#8221; and showing first part<br \/>\nString divided on &#8220;,&#8221; and showing first part, then dividing that answer on &#8221; &#8221; and showing first part<br \/>\nString divided on &#8220;,&#8221; and showing first part, then dividing that answer on &#8221; &#8221; and showing first part, then showing two first letters from the left side<br \/>\nString divided on &#8220;,&#8221; and showing first part, then dividing that answer on &#8221; &#8221; and showing first part, then showing two first letters from the left side, then UPPER means converting that string to uppercase<\/p>\n<p>About the numbers<\/p>\n<p>String divided on &#8220;,&#8221; and showing third part<br \/>\nString divided on &#8220;,&#8221; and showing third part, then dividing that answer on &#8220;-&#8221; and showing first part<br \/>\nString divided on &#8220;,&#8221; and showing third part, then dividing that answer on &#8220;-&#8221; and showing second part<br \/>\nString divided on &#8220;,&#8221; and showing third part, then dividing that answer on &#8220;-&#8221; and showing first and second parts, then sum the two numbers<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Orchestrator support a number of data manipulation functions. These functions can be used to manipulate string and \u00c2\u00a0convert it into a usable form. You can also perform simple arithmetic operations, such as calculating sums and differences, and performing division and multiplication operations. For a complete list of the functions that you can perform see Technet. &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=3602\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[60],"tags":[],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3602"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3602"}],"version-history":[{"count":4,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3602\/revisions"}],"predecessor-version":[{"id":3608,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3602\/revisions\/3608"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3602"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}