{"id":5438,"date":"2017-11-14T18:39:32","date_gmt":"2017-11-14T18:39:32","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=5438"},"modified":"2020-07-01T12:56:42","modified_gmt":"2020-07-01T19:56:42","slug":"eformz-txt-to-xml-guide-reset-line-number-count","status":"publish","type":"post","link":"https:\/\/minisoft.com\/support\/eformz-txt-to-xml-guide-reset-line-number-count\/","title":{"rendered":"eFORMz TXT To XML Guide: Reset Line Number Count"},"content":{"rendered":"<p>Part One: <a href=\"\/support\/index.php\/eformz-txt-to-xml-guide-getting-started\/\">eFORMz TXT to XML Guide: Getting Started<\/a><br \/>\nPart Three:\u00a0<a href=\"\/support\/index.php\/eformz-txt-to-xml-guide-states\/\">eFORMz TXT To XML Guide: States<\/a><br \/>\nPart Four:\u00a0<a href=\"\/support\/index.php\/eformz-txt-to-xml-guide-state-loops\/\">eFORMz TXT To XML Guide: State Loops<\/a><\/p>\n<p>In <a href=\"\/support\/index.php\/eformz-txt-to-xml-guide-getting-started\/\">Part 1<\/a>, we looked at creating lines and states:<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLStatesSuccesful.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5460\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLStatesSuccesful.png\" alt=\"\" width=\"240\" height=\"36\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLStatesSuccesful.png 240w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLStatesSuccesful-150x23.png 150w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><\/a><\/p>\n<p>To continue, right click on the \u201cOrderDetail\u201d\u00a0 state and select \u201cAdd State\u201d. This will add a new state inside of \u201cOrderDetail\u201d state. We currently don\u2019t have any other states to add. Go back to the \u201cLines\u201d column to add another line that we can use for our new state.<\/p>\n<p>You can create a new \u201cline\u201d as we did previously or you can simply click on a variable while holding down ctrl + c and drag that line to copy it. I named mine \u201cCustomerNumber\u201d.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5439\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber.png\" alt=\"\" width=\"246\" height=\"355\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber.png 246w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber-208x300.png 208w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber-104x150.png 104w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumber-125x180.png 125w\" sizes=\"(max-width: 246px) 100vw, 246px\" \/><\/a><\/p>\n<p>In the photo you will notice that I have the number row set to 0. This is referring to the line number in the text. You can see in the photo below the line number is to the left of the text.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5447\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine.png\" alt=\"\" width=\"349\" height=\"55\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine.png 349w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine-300x47.png 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine-150x24.png 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NumberLine-250x39.png 250w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/a><\/p>\n<p>Why would we set the number row to be set to line number zero? Currently there is nothing in line number zero. You can reset the line number count by being in a state. Remember that my line is named \u201cOrderDetail\u201d and that we added a state for the line \u201cOrderDetail\u201d. If you have a state inside of that state it resets the \u201cNumber\u201d row counter. So if there was a state inside of \u201cOrderDetail\u201d, and the \u201cNumber\u201d row was set to 0. It would actually be on line 2 because the text \u201cCustomerNumber:\u201d, which is the line \u201cOrderDetail\u201d, which has the state, \u201cOrderDetail\u201d is the start of the line counter. If the \u201cNumber\u201d row was set to 1 it would then be line 3.<\/p>\n<p>Go back into the states column and select our state that needed to have a line associated with it inside of the \u201cOrderDetail\u201d state. Select the new line you have created and set it. If successfully it should look like this. Don\u2019t forget after you are clicking \u201cSet\u201d you should also be clicking on \u201cTest\u201d.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLCustomerNumber.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5457\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLCustomerNumber.png\" alt=\"\" width=\"240\" height=\"49\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLCustomerNumber.png 240w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLCustomerNumber-150x31.png 150w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><\/a><\/p>\n<p>Go back to the \u201cLines\u201d column and click on \u201cCustomerNumber\u201d. If successfully it should highlight the line that has the CustomerNumber Number on it. It doesn\u2019t always highlight it though.<\/p>\n<p>Right click on the \u201cCustomerNumber\u201d line and select \u201cAdd Parameter\u201d.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NewParamter.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5444\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NewParamter.png\" alt=\"\" width=\"231\" height=\"66\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NewParamter.png 231w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/NewParamter-150x43.png 150w\" sizes=\"(max-width: 231px) 100vw, 231px\" \/><\/a><\/p>\n<p>The \u201cParameter Editor\u201d is used to changed the name of your variable. The \u201cTag\u201d row is going to be the name that will show up in the XML. The \u201cColumn\u201d row is set to where you want to start to extract the data out of. In my case the customer number starts at column 15 and has a character \u201cLength\u201d of 40. It isn\u2019t exactly 40, but I know that it will be less than 40 characters, but could get up to a max of 40.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5448\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor.png\" alt=\"\" width=\"253\" height=\"342\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor.png 253w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor-222x300.png 222w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor-111x150.png 111w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor-250x338.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/ParamterEditor-133x180.png 133w\" sizes=\"(max-width: 253px) 100vw, 253px\" \/><\/a><\/p>\n<p>Don\u2019t forget to set it and click test. If it is successfully it should look like this. The XML column will have created a folder called \u201cPackSlip\u201d with the line variable \u201cCustomerNumber\u201d inside of it.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumberParameter.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5440\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumberParameter.png\" alt=\"\" width=\"231\" height=\"69\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumberParameter.png 231w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/CustomerNumberParameter-150x45.png 150w\" sizes=\"(max-width: 231px) 100vw, 231px\" \/><\/a><\/p>\n<p>The last step is to create an &#8220;End State&#8221; variable. Right click on the &#8220;OrderDetail&#8221; state and select &#8220;Add EndState&#8221;. It will say &#8220;empty&#8221;. It requires a line to be set.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5477\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile1.jpg\" alt=\"\" width=\"237\" height=\"47\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile1.jpg 237w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile1-150x30.jpg 150w\" sizes=\"(max-width: 237px) 100vw, 237px\" \/><\/a><\/p>\n<p>Create a new line in the &#8220;Lines&#8221; column and have it set for the very end of your text file. I named mine &#8220;EndOfFile&#8221; and has it set to line 5 because that is where my text file ends.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5479\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0.jpg\" alt=\"\" width=\"394\" height=\"850\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0.jpg 394w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0-139x300.jpg 139w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0-70x150.jpg 70w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0-250x539.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0-83x180.jpg 83w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile0-232x500.jpg 232w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a><\/p>\n<p>Go back into the &#8220;States&#8221; column and set the &#8220;EndState&#8221; to have your new end of line line.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5478\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile.jpg\" alt=\"\" width=\"244\" height=\"97\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile.jpg 244w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/EndOfFile-150x60.jpg 150w\" sizes=\"(max-width: 244px) 100vw, 244px\" \/><\/a><\/p>\n<p>Set everything and don&#8217;t forget to select &#8220;Test&#8221;. You have just created your first XML variable from text!<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5456\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber.png\" alt=\"\" width=\"318\" height=\"970\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber.png 318w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber-98x300.png 98w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber-49x150.png 49w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber-250x763.png 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber-59x180.png 59w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/11\/XMLColumnCustomerNumber-164x500.png 164w\" sizes=\"(max-width: 318px) 100vw, 318px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Part One: eFORMz TXT to XML Guide: Getting Started Part Three:\u00a0eFORMz TXT To XML Guide: States Part Four:\u00a0eFORMz TXT To XML Guide: State Loops In Part 1, we looked at creating lines and states: To continue, right click on the \u201cOrderDetail\u201d\u00a0 state and select \u201cAdd State\u201d. This will add a new state inside of \u201cOrderDetail\u201d [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[244,267,272,268,270,271,269,6,265,266],"_links":{"self":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5438"}],"collection":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=5438"}],"version-history":[{"count":11,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5438\/revisions"}],"predecessor-version":[{"id":8163,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5438\/revisions\/8163"}],"wp:attachment":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=5438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=5438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=5438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}