{"id":12457,"date":"2022-10-28T11:35:21","date_gmt":"2022-10-28T11:35:21","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=12457"},"modified":"2022-10-28T11:35:21","modified_gmt":"2022-10-28T11:35:21","slug":"copy-a-query-result-set-to-a-table-in-notes-or-book-item","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/copy-a-query-result-set-to-a-table-in-notes-or-book-item\/","title":{"rendered":"Copy a Query Result Set to a Table in Notes or Book Item"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>A query can produce very informative tabulated data that may need to be captured in a table in either a rich text <em>Notes<\/em> field or a <em>Free Text<\/em> item in a <em>Book<\/em>. That data transfer cannot be performed within <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> so the process described below is a workaround.<\/p>\n<h2>Copy a Result Set to a Rich Text Table<\/h2>\n<p>This process seems long-winded when written out but is actually quite fast in practice.<\/p>\n<ol>\n<li>In the <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> Query Result Set select all the cells and copy them to the clipboard.<br \/>\nEither drag the cursor across all the cells, or select top left cell, hold down the Shft key and select bottom right cell, or use the Ctrl-A keyboard shortcut.<br \/>\nEither click the <img decoding=\"async\" class=\"cs_v alignnone\" src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/toolbar_query_6.png\" alt=\"\" width=\"32\" height=\"31\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/toolbar_query_6.png\" \/> <em>Copy Selected Cells<\/em> button in the toolbar, or use the Ctrl-C keyboard shortcut, to copy to the clipboard.<\/li>\n<li>Paste the cells into a word-processor document (MS Word or OpenOffice) and remove the string quotes <strong><code>\"<\/code><\/strong>.<br \/>\nIn the word-processor, click the Paste button, or use the Ctrl-V keyboard shortcut, to paste all the cell text from the clipboard.<br \/>\nUse the Replace <glwrap>function<\/glwrap> to Find every <strong><code>\"<\/code><\/strong> and Replace with nothing to Replace All the string quotes.<\/li>\n<li>Convert the selected cell text to a table, and format as required.<br \/>\nDrag the cursor over all the cell text, or select top left character, hold down Shft key and select bottom right character, or use the Ctrl-A keyboard shortcut, to select all the text.<br \/>\nIn MS Word, use the <em>Insert &gt; Table &gt; Convert Text to Table&#8230;<\/em> command with the options below and click OK, or use a similar option in your chosen word-processor.<br \/>\n<img decoding=\"async\" class=\"aligncenter wp-image-12458 size-medium lazyload\" title=\"Convert Text to Table options\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2022\/10\/Text2Table-242x300.png\" alt=\"Convert Text to Table options\" width=\"242\" height=\"300\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2022\/10\/Text2Table-242x300.png 242w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2022\/10\/Text2Table-121x150.png 121w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2022\/10\/Text2Table.png 253w\" data-sizes=\"(max-width: 242px) 100vw, 242px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 242px; --smush-placeholder-aspect-ratio: 242\/300;\" \/><br \/>\nInsert a new first row in the table and enter the required column headings.<br \/>\nFormat the table as required, e.g. bold heading text, justify columns to right or centre.<\/li>\n<li>In <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> open a rich text window and copy the table.\n<ul>\n<li><em>Notes<\/em> or <em>Text from <glwrap>Source<\/glwrap><\/em> field.<br \/>\nNavigate to the field and either double-left-click the box or click the <img decoding=\"async\" class=\"cs_v alignnone\" src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/date_entry.png\" alt=\"\" width=\"19\" height=\"21\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/date_entry.png\" \/> button on the right of the box, to open the rich text editor window.<br \/>\nSelect, Copy &amp; Paste (Ctrl-A, Ctrl-C, Ctrl-V) the table from the word-processor into the rich text window and perform any further editing and formatting before clicking OK.<\/li>\n<li><em>Book Free Text<\/em> item<br \/>\nIn the <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Publish&nbsp&gt;&nbspBooks&nbsp&amp;&nbspBooklets&#8230;<\/a> <em>Edit Book<\/em> dialogue, add a <em>Free Text<\/em> item, or Edit an existing <em>Free Text<\/em> item, to open its rich text editor window.<br \/>\nSelect, Copy &amp; Paste (Ctrl-A, Ctrl-C, Ctrl-V) the table from the word-processor into the rich text window and perform any further editing and formatting before clicking OK.<br \/>\nChange the <em>Chapter Heading<\/em> setting for the <em>Free Text<\/em> item to an appropriate title.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"template":"","fh_version":[739],"skill_level":[17],"topic":[61,63],"class_list":["post-12457","kb_article","type-kb_article","status-publish","hentry","fh_version-v7","skill_level-intermediate","topic-reports-and-books","topic-searching-and-querying"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/12457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/types\/kb_article"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=12457"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=12457"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=12457"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=12457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}