News.mscrm-addons.com BlogHello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts! https://www.mscrm-addons.com/BlogHow to sort data in DocumentsCorePack with the Relationship Designerhttps://www.mscrm-addons.com/Blog/PostId/10035/how-to-sort-data-in-documentscorepack-wiht-the-relationship-designerDocumentsCorePack (DCP),DCP 2015 / 2016,DCP 365,DocumentsCorePack 2015/2016Fri, 08 Sep 2017 11:26:11 GMT<p>This blog article outlines how to sort data in DocumentsCorePack templates by using the Relationship Designer.<span>This tool allows you to sort your data individually.&nbsp;</span></p> <p><span><strong>&nbsp;1)</strong> First of all, open Microsoft Word and navigate to www.mscrm-addons.com. Next click on the <strong>[Insert MailMerge Fields]</strong>-button and prepare the data you want to sort, e.g. like in the example below.&nbsp;</span></p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><span><a title="Data you want to sort" href="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure1_Data_for_sorting.png"><img alt="Data you want to sort" width="468,5" height="80" class="img-responsive" src="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure1_Data_for_sorting.png" /></a></span></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><span>Figure 1: Data you want to sort</span></div> <p>&nbsp;</p> <p><strong>2)</strong> Next, navigate to the right side and select <span style="font-size: 24px; color: #4f81bd;">❶&nbsp;</span>Additional. Then select the data table you want to sort - in this case, <span style="font-size: 24px; color: #4f81bd;">❷&nbsp;</span>Contact (table1) and click on the &nbsp;<span style="font-size: 24px; color: #4f81bd;">❸&nbsp;</span><strong>[Edit]</strong>-button.&nbsp;</p> <p><span> </span></p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><a title="Additional template settings" href="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure2_Additional_Template_Settings.png"><img alt="Additional template settings" width="468,5" height="80" class="img-responsive" src="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure2_Additional_Template_Settings.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}">Figure 2: Additional template settings</div> <p>&nbsp;</p> <p><strong>3)</strong> &nbsp;In the so opened window, also called Relationship Designer, you can define how you want to sort your data. To do so, you first have to choose the <span style="font-size: 24px; color: #4f81bd;">❶</span>&nbsp;Attribute and then the <span style="font-size: 24px; color: #4f81bd;">❷&nbsp;</span>order you want to sort your data. In this example, we want to sort our data after the First Name Ascending, like you can see below. If you have more than one sorting Attribute, you can specify which should be first executed by setting a <span style="font-size: 24px; color: #4f81bd;">❸</span> priority.&nbsp;</p> <p> </p> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><a title="DCP Relationship Designer" href="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure3_Relationship_Designer.png"><img alt="DCP Relationship Designer" width="468,5" height="80" class="img-responsive" src="http://www.mscrm-addons.com/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure3_Relationship_Designer.png" /></a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}">Figure 3: DCP Relationship Designer&nbsp;</div> <p>&nbsp;</p> <p><strong>Please note: </strong>This function will sort you all records before these will be merged. After saving your template and merged it with Dynamics 365 data, the table should look like below.&nbsp;</p> <div class=" data-plugin-options="> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"> <a title="Result of sorting data with DCP Relationship Designer " href="/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure4_Result_RelationshipDesinger_Sorting.png"> <img alt="Result of sorting data with DCP Relationship Designer" width="468,5" height="320" class="img-responsive" src="/Portals/0/Blog/How_to_sort_Data_in_DCP_with_the_RelationsshipDesigner/Figure4_Result_RelationshipDesinger_Sorting.png" /> </a></div> <div class="lightbox" data-plugin-options="{'delegate': 'a', 'type': 'image', 'gallery': {'enabled': false}}"><em>Figure 4: Result of sorting data with DCP Relationship Designer</em></div> </div> <p>&nbsp;</p> <p>It is also possible to sort grouped tables. &nbsp;For more information about how to group tables in DCP .docx templates, please have a look at this <a href="http://www.mscrm-addons.com/Blog/PostId/10034/how-to-group-tables-in-documentscorepack-docx-templates" target="_blank">blog article.</a>&nbsp;</p> <p style="background-color: #fcfcfc;"><span><strong>That&rsquo;s it!</strong></span>&nbsp;We appreciate your feedback! Please share your thoughts by sending an email to&nbsp;<a href="mailto:support@mscrm-addons.com">support@mscrm-addons.com</a>.</p> <p> </p> <div>&nbsp;</div>10035