{"id":3788,"date":"2016-01-13T20:44:23","date_gmt":"2016-01-13T20:44:23","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=3788"},"modified":"2016-08-03T18:49:30","modified_gmt":"2016-08-03T18:49:30","slug":"removing-blank-lines-conditionally","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/removing-blank-lines-conditionally\/","title":{"rendered":"Removing blank lines conditionally"},"content":{"rendered":"<p>Your label\u00a0might accommodate six lines for an address:<\/p>\n<p><code>Name<br \/>\nBusiness<br \/>\nSuite, building, mailstop etc.<br \/>\nStreet<br \/>\nCity, State, and Zip<br \/>\nCountry<\/code><\/p>\n<p>However, many addresses have only three lines, which usually results in blank lines in the address, like this:<\/p>\n<p><code>Minisoft<\/code><\/p>\n<p><code>1024 First Street<br \/>\nSnohomish, WA 98290<\/code><\/p>\n<p>The procedure to remove the blank lines depends on how you set up your project, but in each case you create a test condition to determine whether a variable is empty.<\/p>\n<p>You can also create a condition to test for a particular value. For example, if you have a variable Country that you want shown only when the value is not USA, you can create a condition to test that. The country will display for the value Canada, but not for the value USA.<\/p>\n<p><strong>Variables in separate paragraphs<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-full wp-image-3794\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table3.jpg\" alt=\"Table3\" width=\"103\" height=\"169\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table3.jpg 103w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table3-91x150.jpg 91w\" sizes=\"(max-width: 103px) 100vw, 103px\" \/><\/p>\n<p>This configuration is shown on the right. If the third variable (named Suite in this example) has no value, a blank line is shown. To eliminate the blank line, create a condition on the paragraph that contains the variable:<\/p>\n<ol>\n<li>Right click the paragraph that has the variable &gt; Add AND Condition &gt; Is not equal to.<\/li>\n<li>Select the variable in the Data Condition window. This example uses the variable name Suite.<\/li>\n<li>Constant is already selected. Leave the text area blank. Click OK. When the variable Suite is blank, the paragraph will be omitted, and no blank line will show.<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-3793 aligncenter\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2-300x205.jpg\" alt=\"Table2\" width=\"300\" height=\"205\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2-300x205.jpg 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2-150x102.jpg 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2-250x170.jpg 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2-264x180.jpg 264w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table2.jpg 396w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<\/ol>\n<p>You can see two conditions added in the following image. The first condition on variable Suite tests whether the variable is blank. The second condition on variable Country tests whether the variable is USA. The variable contents are only shown if the variable is not set to USA.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-3798 aligncenter\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table4-1.jpg\" alt=\"Table4\" width=\"247\" height=\"259\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table4-1.jpg 247w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table4-1-143x150.jpg 143w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table4-1-172x180.jpg 172w\" sizes=\"(max-width: 247px) 100vw, 247px\" \/><\/p>\n<p><strong>In a paragraph with line breaks<\/strong><\/p>\n<p>This image on the right shows this\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"wp-image-3792 size-full alignright\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table.jpg\" alt=\"\" width=\"184\" height=\"226\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table.jpg 184w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table-122x150.jpg 122w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2016\/01\/Table-147x180.jpg 147w\" sizes=\"(max-width: 184px) 100vw, 184px\" \/>configuration. You cannot remove the blank lines from this configuration because line breaks cannot have conditions defined on them.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your label\u00a0might accommodate six lines for an address: Name Business Suite, building, mailstop etc. Street City, State, and Zip Country However, many addresses have only three lines, which usually results in blank lines in the address, like this: Minisoft 1024 First Street Snohomish, WA 98290 The procedure to remove the blank lines depends on how [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/3788"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=3788"}],"version-history":[{"count":11,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/3788\/revisions"}],"predecessor-version":[{"id":4206,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/3788\/revisions\/4206"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=3788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=3788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=3788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}