{"id":13230,"date":"2026-09-22T18:05:09","date_gmt":"2026-09-22T18:05:09","guid":{"rendered":"https:\/\/www.fhug.org.uk\/kb\/?post_type=kb_article&#038;p=13230"},"modified":"2026-10-16T07:06:22","modified_gmt":"2026-10-16T07:06:22","slug":"an-overview-of-queries-in-version-8","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/an-overview-of-queries-in-version-8\/","title":{"rendered":"An Overview of Queries in Version 8"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>According to the Family Historian Help file &#8220;A <span class=\"definition\">query<\/span> is a reusable set of instructions for extracting information from a Family Historian project. The information returned by a query is called a <em><span class=\"definition\">result set<\/span><\/em>, and it is laid out in tabular form, in a grid of rows and columns.&#8221; If the query is an <span class=\"definition\">Individual<\/span> query, each row corresponds to an Individual record; if it is a <span class=\"definition\">Source<\/span> query, each row corresponds to a Source record; and so on for every record type. There are also three types of query that do not return records: Fact queries (one row per event or attribute), Citation queries (one row per source citation) and Witness queries (one row per person in a non-principal role in a shared event).<\/p>\n<p>Queries are a very powerful feature of <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> because they allow you to analyse your data in almost any way you can think of. What did my direct ancestors die from? How large were the families of the people in my tree? What facts have I entered without citing a source? All these and many more questions can be answered using Queries.<\/p>\n<p>This article is for <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> Version 8, which rebuilt the Query Window. If you use Version 7 or earlier, see <a href=\"\/kb\/kb-article\/an-overview-of-queries\/\">An Overview of Queries in Version 7 and below<\/a>. Queries written for earlier versions (<code>.fhq<\/code> files) are converted automatically when you install Version 8 or import them; the Version 8 format is <code>.fhqx<\/code>.<\/p>\n<h2>Standard and Custom Queries<\/h2>\n<p>Queries fall into two categories: Standard Queries, which are distributed with <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> and cannot be edited (except to change the behaviour when printed), and Custom Queries which are created by users (either for personal use or to share via <a href=\"\/kb\/download-type\/query\/\">the Queries section of our Downloads page<\/a>).<\/p>\n<p>Queries are run from the <em>Query<\/em> button on the main toolbar, whose dropdown lists them by category; the first item opens the Query Window without running anything, and <em>New Custom Query<\/em> and <em>Manage Queries<\/em> are on the same menu. Inside the Query Window, the cog menu on the query toolbar has the same commands plus <em>Save As Custom Query<\/em>, which is the usual way to start from a standard query you want to change.<\/p>\n<p>See <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh8\/querywindow.html\" target=\"_blank\" rel=\"noopener noreferrer\">The Query Window<\/a> for instructions on how to use the Query Window and all its tabs. You are advised to read the Help file before moving on to the Hints and Tips below.<\/p>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>What Changed in Version 8<\/h2><\/summary><div class=\"lightweight-accordion-body\"><figure id=\"attachment_13265\" aria-describedby=\"caption-attachment-13265\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc.png\"><img decoding=\"async\" class=\"wp-image-13265 lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc-761x1024.png\" alt=\"Columns tab: the Fields Etc list with Common Functions\" width=\"300\" height=\"404\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc-761x1024.png 761w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc-223x300.png 223w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc-111x150.png 111w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-fields-etc.png 765w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/404;\" \/><\/a><figcaption id=\"caption-attachment-13265\" class=\"wp-caption-text\">Columns tab: the Fields Etc list with Common Functions<\/figcaption><\/figure>\n<p>If you know the Version 7 Query Window, these are the differences you will notice:<\/p>\n<ul>\n<li>The <em>Rows<\/em> tab is now the <em>Filters<\/em> tab, and the four conditions (<em>Add If<\/em>, <em>Add Unless<\/em>, <em>Exclude If<\/em>, <em>Exclude Unless<\/em>) have gone. Filters are now combined with AND and OR, grouped into subgroups nested as deep as you like, and shown as a tree: AND groups in blue, OR groups in green. Old queries are converted automatically. See <em>Filters<\/em> below.<\/li>\n<li>&#8220;Parameter&#8221; is now &#8220;Prompt&#8221; throughout.<\/li>\n<li>The <em>Fields<\/em> list on the Columns tab is now <em>Fields Etc<\/em>, because it also contains a <em>Common Functions<\/em> branch (with <em>Counts<\/em> beneath it) of ready-made function expressions you can add without writing them.<\/li>\n<li>Expressions are hidden by default in both the Columns and Filters lists; the cog menu below each list has <em>Show Expressions<\/em>. Filters can carry a description instead.<\/li>\n<li>The Data Reference Assistant is now the <em>Expression Entry Assistant<\/em>, reached from the <em>Insert<\/em> button beside any expression field, and helps with functions as well as data references.<\/li>\n<li>A <em>Manage Queries<\/em> tool lists every query with its type, description and last-updated date, filterable by category, type or text, and is where you rename, clone, delete, import and export.<\/li>\n<li>Three new query types: Address, Citation and Witness. Several new standard queries.<\/li>\n<li>A new column type, <em>Group By<\/em>, used by Smart Folders (see <a href=\"\/kb\/kb-article\/an-overview-of-smart-folders\/\">An Overview of Smart Folders<\/a>). The Query Window is also where Smart Folders are designed; the button on its own toolbar shows or hides the Smart Folder pane.<\/li>\n<li>Drag and drop works in both the Columns and Filters lists (hold Ctrl to copy), and you can drag a field straight from the Fields Etc list into the Columns list.<\/li>\n<li>Right-click a record in the Result Set for <em>Record Links<\/em>, which lists everything that links to it.<\/li>\n<li>Queries are stored as <code>.fhqx<\/code> files.<\/li>\n<\/ul>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Filters<\/h2><\/summary><div class=\"lightweight-accordion-body\"><figure id=\"attachment_13266\" aria-describedby=\"caption-attachment-13266\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab.png\"><img decoding=\"async\" class=\"wp-image-13266 lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-1024x600.png\" alt=\"Filters tab: AND (blue) and OR (green) groups\" width=\"800\" height=\"469\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-1024x600.png 1024w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-300x176.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-150x88.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-768x450.png 768w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-1536x900.png 1536w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-query-filters-tab-2048x1200.png 2048w\" data-sizes=\"(max-width: 800px) 100vw, 800px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 800px; --smush-placeholder-aspect-ratio: 800\/469;\" \/><\/a><figcaption id=\"caption-attachment-13266\" class=\"wp-caption-text\">Filters tab: AND (blue) and OR (green) groups<\/figcaption><\/figure>\n<p>Every query has a domain, which is the whole set of records or items of its type, and filters decide which of them appear in the result set. If there are no filters, everything appears. There are four kinds, each with its own tab at the bottom of the Filters tab: <em>General<\/em> (an expression compared with a value; this is where prompts live, so that the person running the query is asked for a value), <em>Relationships<\/em> (Individual queries only), <em>List<\/em> (membership of a Named List; record queries only) and <em>Subgroup<\/em>.<\/p>\n<p>When you add a filter you are asked how it should combine with the ones already there, AND or OR, and <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> makes a subgroup if it needs one. Right-click a filter or the background of the list for the cog menu: clone, disable, move into or out of a group, and set whether the top-level group or any subgroup is matched when all its members match (AND) or any of them do (OR). Disabling a filter (or a whole subgroup) is the quickest way to find out which one is producing an unexpected result.<\/p>\n<figure id=\"attachment_13263\" aria-describedby=\"caption-attachment-13263\" style=\"width: 250px\" class=\"wp-caption alignright\"><a href=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant.png\"><img decoding=\"async\" class=\"wp-image-13263 lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant-638x1024.png\" alt=\"Expression Entry Assistant\" width=\"250\" height=\"401\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant-638x1024.png 638w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant-187x300.png 187w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant-94x150.png 94w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant-768x1232.png 768w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-expression-entry-assistant.png 780w\" data-sizes=\"(max-width: 250px) 100vw, 250px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 250px; --smush-placeholder-aspect-ratio: 250\/401;\" \/><\/a><figcaption id=\"caption-attachment-13263\" class=\"wp-caption-text\">Expression Entry Assistant<\/figcaption><\/figure>\n<p>Two things carried over from the old Rows tab are worth knowing. Relationship filters are still applied in order within their group, so &#8220;any of the above&#8221; means the filters above it in the same group. And the standard queries&#8217; filters all have descriptions; when you write your own, giving each a description makes the tree readable without expressions.<\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Working with Query Results<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>Any entry that is a Record can be double-clicked to open its Property Box to review or edit fields, or right-clicked for <em>Properties<\/em> and <em>Record Links<\/em>.<\/p>\n<p>Any entry that is a Data Field can be right-clicked to choose <em>Locate in Property Box<\/em> or <em>Locate in All Tab<\/em>. Notes and other long text can be opened with <em>View in Note Window<\/em>.<\/p>\n<p>Any entry that is a Data Field can have its contents deleted by pressing the DELETE key. Also, by selecting multiple entries such as an entire column, bulk deletes can be applied. Ctrl+A selects the whole result set.<\/p>\n<p>The cog menu also has <em>Run and Invert Result Set<\/em> (everything the query does not match), and commands to add the row records to a Named List or set a flag on them.<\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Printing the Results Set from a Query<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>It is possible to <em>Print the Results Set<\/em> from a Query, and the <em>General<\/em> tab of the Query Window has the Title, Subtitle, orientation and multi-page options for the printed output. Title and subtitle accept special codes for the date and time; see <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh8\/querywindowgeneraltab.html\" target=\"_blank\" rel=\"noopener noreferrer\">Query Window: General Tab<\/a>.<\/p>\n<p>The <em>Title<\/em> and custom <em>Subtitle<\/em> also have an undocumented feature: a value entered at a prompt could be included by writing it as <code>[\"Prompt\"]<\/code>, where Prompt is the prompt&#8217;s label, wrapped in a type function of the matching kind, e.g. <code>Date =Number([\"Day\"]) of =Text([\"Month\"]) for =Individual([\"Person\"])<\/code>.<\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Saving Results to a File<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>The <em>Save Result Set As<\/em> command on the cog menu saves the whole result set as a PDF, a comma-separated CSV file or a text file. The CSV options offer UNICODE UTF-8 and ANSI encoding, but some spreadsheet programs do not handle UNICODE UTF-8 well, so try both options, or even the Save As Text File options with either Tab character or Comma as the column separators. See also <a href=\"https:\/\/smallbusiness.chron.com\/open-utf8-excel-63726.html\">How to Open UTF-8 in Excel<\/a>.<\/p>\n<p>You should note that Excel (as shipped) does not support dates earlier than 1 January 1900. There are two approaches to dealing with this:<\/p>\n<ol>\n<li>Use numerical columns for Day, Month and Year in your queries if you intend to export them to Excel.<\/li>\n<li>If you&#8217;re very comfortable with Excel, explore the techniques in <a href=\"http:\/\/www.exceluser.com\/formulas\/earlydates.htm\">How to Work with Dates Before 1900 in Excel<\/a>.<\/li>\n<\/ol>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Custom Queries<\/h2><\/summary><div class=\"lightweight-accordion-body\"><figure id=\"attachment_13264\" aria-describedby=\"caption-attachment-13264\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries.png\"><img decoding=\"async\" class=\"wp-image-13264 lazyload\" data-src=\"\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries-300x279.png\" alt=\"Manage Queries dialog\" width=\"300\" height=\"279\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries-300x279.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries-1024x952.png 1024w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries-150x139.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries-768x714.png 768w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2026\/09\/fh8-manage-queries.png 1338w\" data-sizes=\"(max-width: 300px) 100vw, 300px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 300px; --smush-placeholder-aspect-ratio: 300\/279;\" \/><\/a><figcaption id=\"caption-attachment-13264\" class=\"wp-caption-text\">Manage Queries dialog<\/figcaption><\/figure>\n<p>You can create your own custom queries \u2014 see <a href=\"\/kb\/videos\/?tx_topic=searching-and-querying\">Searching and Querying Videos<\/a> for video tutorials on how to do so (made for Version 7, so the Rows tab they show is now the Filters tab). The easiest start is <em>Save As Custom Query<\/em> on a standard query that does nearly what you want, then edit the copy. When you create one from scratch, leave <em>Add default columns<\/em> ticked; you get the columns the Records Window uses for that record type and can prune from there.<\/p>\n<p>Or you can download a Custom Query that somebody else has written (for example from <a href=\"\/kb\/download-type\/query\/\">the Queries section of our Downloads page<\/a> or the <a href=\"https:\/\/fhug.org.uk\/forum\/index.php\">FHUG forums<\/a>). If you download a Custom Query, you must install it before you can use it. The simplest way to do so is to double-click on the file to open it; <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span> will automatically install it. Queries written for earlier versions are converted as they are installed.<\/p>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Custom Query Types<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>It is important to consider which type of Query will be most useful for the problem you want to solve.<\/p>\n<ul>\n<li>Individual queries are the most popular. They return a set of Individual records; the columns can include records linked to an Individual (e.g. Family or Source records, or Individual records for spouses and children). For example, if you want to identify a set of Individuals who meet a set of criteria (e.g. male Individuals who were born between two specified years and still alive in 1914, so might have legally served in World War 1) an Individual query is what you need. However, to show more than a few selected Facts in the Result Set will require a Column for every field of each and every type of Fact plus each and every instance of multiple Facts such as Census. That could run to dozens if not hundreds of Columns. If your focus is on the Facts for a set of Individuals, consider a Fact Query instead.<\/li>\n<li>A Fact Query focuses on Facts, not records, but the Columns and Filters can refer to any items, including records associated with a Fact. For example it can include, each in a different Column, the Individual or Family record that owns the Fact, or any Source records cited by the Fact. However, each Row in the Result Set is keyed to just one unique Fact, and that Fact is only represented on one Row. So, if you want to view all the Education Facts for people in your family tree, a Fact query is what you want.<\/li>\n<li>A Citation Query returns one row per source citation, with the source, the record and fact cited, and <em>Where within Source<\/em> available as columns. It is the natural way to find everything cited to a source, or every citation with a particular assessment.<\/li>\n<li>A Witness Query returns one row for each person in a non-principal role in a shared event: every bridesmaid, every godparent, every beneficiary of a will. Someone who witnessed the same event twice gets two rows.<\/li>\n<li>Family queries will return a list of Family records that meet your chosen criteria. So, if you want to see a list of couples who married between two dates in a particular place, a Family query is what you want.<\/li>\n<li>You can also construct Queries based on Address, Media, Note, Place, Repository, Research Note and Source Template records. For example, you can query to see all the Sources you consulted at a particular Repository, or every Address linked to a given Place.<\/li>\n<\/ul>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Columns Tab Advice<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>In the Columns Tab:<\/p>\n<ul>\n<li>Data Reference Fields are chosen using the Fields Etc pane on the left. Click on any + sign to expand a sub-list, and having selected a Field, click on the <em>Add Column &gt;<\/em> button (or double-click it, or drag it across). This will add a Heading and an Expression to the Columns pane on the right. Although these Columns are listed vertically, they will appear horizontally in the Result Set, and moving them up and down actually moves them left and right in the results.<\/li>\n<li>The <em>Common Functions<\/em> branch of the same list holds ready-made expressions such as ages, counts of spouses or children, and <em>Address and Place<\/em>; select one and read its description in the box below before adding it. For an introduction to writing your own see <a href=\"\/kb\/kb-article\/understanding-data-references\/\">Understanding Data References<\/a> and <a href=\"\/kb\/kb-article\/understanding-functions\/\">Understanding Functions<\/a>. If you have created Text Schemes in Diagrams, these Expressions are almost identical.<\/li>\n<li>Remember that many Data Reference Fields can have more than one instance, but only the first one is added by default. For example the Individual &gt; Name field has an Expression of <code>%INDI.NAME[1]%<\/code>. If any Individual has Alternate Names then <code>%INDI.NAME[2]%<\/code> and <code>%INDI.NAME[3]%<\/code> will also exist, and these must be entered as extra Columns and the index adjusted to [2] or [3] by hand (turn on <em>Show Expressions<\/em> from the cog menu to see them). It is easily overlooked that Attributes, Events, Sources, and many other fields often have multiple instances that need to be incorporated.<\/li>\n<li>Column types are Normal, Hidden, Buddy and Group By. Hidden columns sort without showing; a Buddy column data-links the column before it so that double-clicking opens the record; Group By is for Smart Folders and behaves as Hidden in an ordinary query.<\/li>\n<\/ul>\n<\/div><\/details><\/div>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h2>Sorting a Fact Query on Owner Surname<\/h2><\/summary><div class=\"lightweight-accordion-body\"><p>In a Fact Query the Owner of the Fact is displayed using one of these Column Expressions:<\/p>\n<ul>\n<li><code>=FactOwner(%FACT%,1,MALES_FIRST)<\/code> for Family Fact Husband or Individual Fact Owner.<\/li>\n<li><code>=FactOwner(%FACT%,2,MALES_FIRST)<\/code> for Family Fact Wife (otherwise blank).<\/li>\n<li><code>=GetRecord(%FACT%)<\/code> for Family Fact Husband &amp; Wife record or Individual Fact Owner record.<\/li>\n<\/ul>\n<p>They all display the name of the owner with forenames first and surname last, so it is not possible to sort them in surname order. The following column expressions allow you to obtain surname sort order:<\/p>\n<ul>\n<li><code>=FieldText(FactOwner(%FACT%,1,MALES_FIRST),'INDI.NAME:SURNAME_FIRST')<\/code> which displays the surname first, and sorts in surname order, but is NOT an active link to the Individual record.<\/li>\n<li><code>=Field(FactOwner(%FACT%,1,MALES_FIRST),'INDI.NAME')<\/code> which still displays forenames first, but sorts in surname order, and is an active link to the Individual record.<\/li>\n<\/ul>\n<p>Those two Expressions can be combined into one Result Set Column that exhibits the best features of both:<\/p>\n<ul>\n<li>1st Column uses Expression: =FieldText(\u2026) with Sort: None and Type: Normal so appears in Result Set.<\/li>\n<li>2nd Column uses Expression: =Field(\u2026) with Sort: Ascending and Type: Buddy so is hidden, but defines the sort order of 1st Column and provides an active link.<\/li>\n<\/ul>\n<\/div><\/details><\/div>\n","protected":false},"template":"","fh_version":[826],"skill_level":[17,16],"topic":[63],"class_list":["post-13230","kb_article","type-kb_article","status-publish","hentry","fh_version-v8","skill_level-intermediate","skill_level-newcomer","topic-searching-and-querying"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/13230","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"}],"version-history":[{"count":0,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/13230\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=13230"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=13230"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=13230"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=13230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}