{"id":4993,"date":"2015-11-03T05:23:33","date_gmt":"2015-11-03T05:23:33","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=4993"},"modified":"2016-03-08T20:48:37","modified_gmt":"2016-03-08T20:48:37","slug":"creating-two-column-layout-in-flow","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/creating-two-column-layout-in-flow\/","title":{"rendered":"Creating two column layout in Flow"},"content":{"rendered":"<figure id=\"attachment_4994\" aria-describedby=\"caption-attachment-4994\" style=\"width: 625px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4994\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?resize=625%2C211&#038;ssl=1\" alt=\"Salesforce Two column layout in Flow\" width=\"625\" height=\"211\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?resize=1024%2C345&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?resize=300%2C101&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?resize=624%2C210&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-Two-column-layout-in-Flow.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-4994\" class=\"wp-caption-text\">Salesforce Two column layout in Flow<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">Salesforce flow does not support two column page layout in flow, please <a href=\"https:\/\/success.salesforce.com\/ideaView?id=08730000000ielNAAQ\">vote this idea<\/a> if you want it as out of box functionality.<\/p>\n<p style=\"text-align: justify;\">However, using below solution we can convert single column page layout to double column layout in flow.<\/p>\n<p style=\"text-align: justify;\">We need to embed flow in below Visualforce. Not necessarily you need to have a knowledge of Visualforce code, simply copy paste in your Salesforce organization and replace flow name with your flow name in your organization. This Visualforce page uses JQuery library to manipulate DOM element. Please download latest version of JQuery and save it as static resource with name &#8220;JQuery2_1_4&#8221; or you can also update static resource name in below code.<!--more--><\/p>\n<p style=\"text-align: justify;\">You can use variable &#8220;ignoreTableRows&#8221; to add row numbers or field sequence which you don&#8217;t want to covert as two column. I have added as much as comment to make code self explanatory.<\/p>\n<p><strong>Visualforce page:<\/strong><\/p>\n<pre class=\"brush: xml; highlight: [12]; title: ; notranslate\" title=\"\"> \r\n&lt;!-- Author : Jitendra Zaa Description : Below Visualforce page converts single column flow to double column layout --&gt;\r\n&lt;apex:page &gt;\r\n    &lt;!-- Enter your flow name below --&gt;\r\n    &lt;flow:interview name=&quot;Two_column_flow&quot; finishLocation=&quot;\/{!$CurrentPage.parameters.id}&quot;&gt;\r\n        &lt;apex:param name=&quot;varFlowVar&quot; value=&quot;{!$CurrentPage.parameters.id}&quot;\/&gt;\r\n    &lt;\/flow:interview&gt; \r\n    \r\n    &lt;apex:includeScript value=&quot;{!$Resource.JQuery2_1_4}&quot;\/&gt;\r\n    \r\n    &lt;script&gt;\r\n        \/\/row number of fields which should be rendered as single column, index starts with 0.\r\n    \tvar ignoreTableRows = &#x5B;0,1,6];\r\n    \t\r\n    function isValidRow(rowIndex){\r\n      for(var j = 0; j&lt; ignoreTableRows.length; j++)\r\n          {\r\n          \t if(rowIndex == ignoreTableRows&#x5B;j])\r\n                 return false;\r\n          }\r\n        return true;\r\n      }\r\n        \r\n    $(function() {\r\n        var tableRowCounter = 0;\r\n        var tbl = $('table .detailList');\r\n        var rows = $('tr', tbl);        \r\n       var i = 0;\r\n        for(i = 0; i&lt;rows.length;i++){ \r\n          if(isValidRow(i)) { \r\n           var currentRow = $('tr:eq('+i+')', tbl); \r\n           var nextRowIndex = i+1; \/\/check if next row is valid             if(!isValidRow(nextRowIndex)) { \r\n   while(!isValidRow(nextRowIndex)) { \r\n           nextRowIndex = nextRowIndex +1; \r\n                if(nextRowIndex &gt;= rows.length)\r\n                        break;\r\n                    }\r\n                }\r\n                var nextRow = $('tr:eq('+nextRowIndex+')', tbl);                \r\n                if(nextRow) {\r\n                    var currentColumns = $('td', currentRow);\r\n                    var nextRowColumns = $('td', nextRow);\r\n                    \r\n                    if(currentColumns&#x5B;2] &amp;&amp; currentColumns&#x5B;3]) {\r\n                        \/\/remove 3rd and 4th column\r\n                        $(currentColumns&#x5B;2]).remove();\r\n                        $(currentColumns&#x5B;3]).remove();                        \r\n                        $(nextRowColumns&#x5B;0]).detach().appendTo(currentRow);\r\n                        $(nextRowColumns&#x5B;1]).detach().appendTo(currentRow);  \r\n                        $(nextRow).remove(); \t\r\n                      } \r\n                 } \r\n            } \r\n        }         \r\n    }); \r\n    &lt;\/script&gt;\r\n\r\n\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n        .dataCol, .labelCol{\r\n            padding-top: 5px !important;\r\n            padding-bottom: 5px !important;\r\n        }\r\n    &lt;\/style&gt;\r\n\r\n\r\n&lt;\/apex:page&gt;\r\n<\/pre>\n<p><strong>Demo output :<\/strong><\/p>\n<figure id=\"attachment_4996\" aria-describedby=\"caption-attachment-4996\" style=\"width: 625px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4996\" src=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?resize=625%2C292&#038;ssl=1\" alt=\"Preview Column 1 to Column 2 in Salesforce flow\" width=\"625\" height=\"292\" srcset=\"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?resize=1024%2C478&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?resize=624%2C291&amp;ssl=1 624w, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Preview-Column1-to-Column2-in-Salesforce-flow.png?w=1617&amp;ssl=1 1617w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><figcaption id=\"caption-attachment-4996\" class=\"wp-caption-text\">Preview Column 1 to Column 2 in Salesforce flow<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Simple utility to convert One column to Two column layout in Salesforce Flow<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9],"tags":[352],"class_list":["post-4993","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-flow"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":5885,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-spring-17-release-my-favorite-features\/","url_meta":{"origin":4993,"position":0},"title":"Salesforce Spring 17 release &#8211; My favorite features","author":"Jitendra","date":"January 27, 2017","format":false,"excerpt":"List of my favorite features in Salesforce Spring 17","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce Apex Batch job - Spring 17","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/01\/Salesforce-Apex-Batch-job-Spring-17.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/01\/Salesforce-Apex-Batch-job-Spring-17.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/01\/Salesforce-Apex-Batch-job-Spring-17.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/01\/Salesforce-Apex-Batch-job-Spring-17.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5010,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/creating-none-required-dropdown-field-in-flow\/","url_meta":{"origin":4993,"position":1},"title":"Non mandatory dropdown field in Flow","author":"Jitendra","date":"November 12, 2015","format":false,"excerpt":"Creating Non Mandatory dropdown field in Salesforce flow","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce flow Output","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-flow-Output.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-flow-Output.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Salesforce-flow-Output.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4967,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-flow-interview-questions-for-admins-part-23\/","url_meta":{"origin":4993,"position":2},"title":"Salesforce Flow Interview Questions for admins &#8211; Part 23","author":"Jitendra","date":"December 7, 2015","format":false,"excerpt":"\ufeff Consider it interview questions or FAQs, However below are some high level information or gotchas related to Salesforce Flow. 221. How to create lookup field in Salesforce flow? Ans : There is no direct way to create a lookup field in flow but we can use workaround mentioned in\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Sample Salesforce flow using loop element","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Sample-Salesforce-flow-using-loop-element.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Sample-Salesforce-flow-using-loop-element.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/11\/Sample-Salesforce-flow-using-loop-element.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":6298,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-winter-18-release-my-favorite-features\/","url_meta":{"origin":4993,"position":3},"title":"Salesforce Winter 18 Release \u2013 My Favorite Features","author":"Jitendra","date":"October 4, 2017","format":false,"excerpt":"My favorite Salesforce Winter 18 features about Lightning, Flow, Platform Event , Shield and Salesforce DX","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Flow in Salesforce App Builder","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/10\/Flow-in-Salesforce-App-Builder.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/10\/Flow-in-Salesforce-App-Builder.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/10\/Flow-in-Salesforce-App-Builder.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/10\/Flow-in-Salesforce-App-Builder.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4987,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/flow-in-salesforce-youtube-video-tutorial\/","url_meta":{"origin":4993,"position":4},"title":"Flow in Salesforce &#8211; Youtube Video tutorial","author":"Jitendra","date":"October 31, 2015","format":false,"excerpt":"Short video tutorials to understand basics of Salesforce flow and how to get most of it","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/4tR0nNVjhjM\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5070,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/dependent-picklist-in-salesforce-flow-using-custom-metadata-type-video\/","url_meta":{"origin":4993,"position":5},"title":"Dependent picklist in Salesforce flow using Custom Metadata type &#8211; Video","author":"Jitendra","date":"December 7, 2015","format":false,"excerpt":"Salesforce flow is great alternative for Visualforce pages used by admin. I have written, multiple blog post on Salesforce flow already and in this post we will discuss how we can create dependent picklist in Flow. If you are already using flow, might know that creating dependent picklist is not\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Salesforce flow - Dependent picklist output","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/12\/Salesforce-flow-Dependent-picklist-output.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=4993"}],"version-history":[{"count":10,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4993\/revisions"}],"predecessor-version":[{"id":5407,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4993\/revisions\/5407"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=4993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=4993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=4993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}