{"id":10971,"date":"2020-07-18T15:36:57","date_gmt":"2020-07-18T15:36:57","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=10971"},"modified":"2024-02-22T15:00:16","modified_gmt":"2024-02-22T15:00:16","slug":"record-identifiers","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/record-identifiers\/","title":{"rendered":"Record Identifiers"},"content":{"rendered":"<p>Every\u00a0<em>Record<\/em> in Family Historian has a numeric <em>Record Identifier<\/em> which is <strong>unique within its type of record<\/strong>. Records of different types may share the same identifier, but this is a meaningless coincidence.<\/p>\n<h2>How are Record Identifiers Assigned?<\/h2>\n<ul>\n<li>Identifiers are assigned automatically, starting from 1, and are never reused within a record type. Therefore, you cannot assume that they form an unbroken run \u2014 as soon as you delete a record, a gap appears in the sequence of Record Identifiers.<\/li>\n<li>One consequence of the existence of these gaps is that you cannot rely on the highest Record Id to help you determine how many records you have of a particular type. Instead us <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">File&nbsp&gt;&nbspFile&nbspStatistics&#8230;[<\/a> to view record counts.<\/li>\n<li>The maximum Record ID value is 2,147,483,647 = 231 &#8211; 1, so in practice, there will never be a point at which a Project runs out of Records IDs.<\/li>\n<\/ul>\n<h2>Displaying Record IDs<\/h2>\n<ul>\n<li>By default, Records IDs are not visible on the Focus Window, but you can use <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspPreferences<\/a>, go to the <em>Focus Window<\/em> tab and tick the option to show <em>Record Id<\/em>s.<\/li>\n<li>Records IDs are shown by default in the <em>Record Window <\/em>and in the header of a <em>Property Box.<\/em> If you know the Record ID of a record you wish to view, the Records Windows has a\u00a0<em>Go To:<\/em> option to find that record quickly.<\/li>\n<li>They also appear in the\u00a0<em>All tab<\/em> of a property box for associated records (e.g. the parents of an individual).<\/li>\n<li>In a Diagram or Query, you can use a function such as\u00a0<code>=RecordId(%INDI%<\/code>), or <code>=RecordId(%FAM%)<\/code>\u00a0or\u00a0<code>=RecordId(%SOUR%)<\/code> to display a Record ID.<\/li>\n<\/ul>\n<h2>Custom IDs<\/h2>\n<ul>\n<li>In addition to the Record ID assigned by <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>, most records can also have a <em>Custom IDs<\/em>, i.e. alphanumeric identifier assigned by the user. These can be useful if you need to cross reference a record with one or more external system (perhaps another genealogy database, or an online tree).<\/li>\n<li>By default, these can be added on the All tab of the Property Box: right-click the record Name and use Add Miscellaneous then Add Custom Id, or for some records just Add Custom Id.<\/li>\n<li>Once added, they are visible on the All tab, but you can also customise the <em>Main<\/em> tab so that you can view and edit them directly:\n<ul>\n<li>Use the menu button <img decoding=\"async\" class=\"cs_v alignnone lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/propertyboxfactstab_13.png\" alt=\"\" width=\"41\" height=\"30\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 41px; --smush-placeholder-aspect-ratio: 41\/30;\" \/> and choose\u00a0<em>Customize Data Entry&#8230;\u00a0\u00a0<\/em>Find Custom Id in the left hand pane and use the &gt; button\u00a0<img decoding=\"async\" class=\"cs_v alignnone lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/helpv6\/edittextschemedialog_3.png\" alt=\"\" width=\"27\" height=\"21\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 27px; --smush-placeholder-aspect-ratio: 27\/21;\" \/>\u00a0 to add it to the Selected items in the right hand pane. Click OK.<\/li>\n<\/ul>\n<\/li>\n<li>The Custom Id can also be customised into a Records Window column via <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Lists&nbsp&gt;&nbspConfigure&nbspRecord&nbspWindow&nbspColumns<\/a>, and sorted into order. The default Expression is <code>%INDI.REFN%<\/code> which will sort alpha-numerically. To sort purely numeric Custom Id then edit the column Expression to use <code>=TextToNumber(%INDI.REFN%)<\/code>. Similar Expressions can be used in Diagrams, Reports, Queries, etc.<\/li>\n<li>Every record that allows a\u00a0Custom Id\u00a0actually allows an unlimited quantity of them such as\u00a0<code>%INDI.REFN[1]%<\/code>\u00a0and\u00a0<code>%INDI.REFN[2]%<\/code>. Also each\u00a0Custom Id\u00a0offers a subsidiary classification\u00a0Type\u00a0field such as\u00a0<code>%INDI.REFN[1].TYPE%<\/code>. As described above, all these fields can be customised into the\u00a0Property Box,\u00a0Records Window, etc, and the\u00a0Type\u00a0field tested to conditionally include classes of\u00a0Custom Id, e.g.<code>\u00a0=TextIf(%INDI.REFN[1].TYPE%=\"Prime\",%INDI.REFN[1]%,\"\")<\/code>.<\/li>\n<\/ul>\n<h2><span style=\"color: #252525; font-size: 21px;\">Renumbering Records<\/span><\/h2>\n<p>There is a method of modifying Record Ids, but generally the Record Id should be left alone because of the possible impact on saved Charts or Diagrams, Reports, Websites, and Internet Data Matching. <strong>Only experienced users who are happy that their actions will not cause corruption should proceed beyond this point.<\/strong><\/p>\n<div class=\"lightweight-accordion\"><details><summary class=\"lightweight-accordion-title\"><h3>Procedure<\/h3><\/summary><div class=\"lightweight-accordion-body\"><p>Use <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">Tools&nbsp&gt;&nbspRecord&nbspIdentifiers&#8230;<\/a> to display the\u00a0<em>Work with Record Identifiers<\/em> dialog.<\/p>\n<p><img decoding=\"async\" class=\"alignleft wp-image-10979 lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/Screenshot-2020-07-18-18.20.01.png\" alt=\"\" width=\"400\" height=\"409\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/Screenshot-2020-07-18-18.20.01.png 461w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/Screenshot-2020-07-18-18.20.01-294x300.png 294w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/07\/Screenshot-2020-07-18-18.20.01-147x150.png 147w\" data-sizes=\"(max-width: 400px) 100vw, 400px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 400px; --smush-placeholder-aspect-ratio: 400\/409;\" \/><\/p>\n<p>Click the Help button for the <a href=\"https:\/\/www.family-historian.co.uk\/help\/fh6\/hh_start.htm#workwithrecordidentifiers.html\" target=\"_blank\" rel=\"noopener noreferrer\">explanation of each item<\/a>.<\/p>\n<p>Choose the\u00a0Record Type you want to manipulate.<\/p>\n<p>The simplest option is to renumber all records starting from 1.<\/p>\n<p>To selectively renumber particular records takes the following steps, and relies on the Custom Id field being unused in every record. This can be used to back fill missing Record Ids caused by deleting or merging records.<\/p>\n<ul>\n<li>Select\u00a0<em>Copy existing record ids into the Custom Id field<\/em>, then\u00a0<em>Perform Task<\/em>\u00a0and\u00a0<em>Close\u00a0<\/em>dialogue.<\/li>\n<li>Open the Property Box of a record to be selectively renumbered. On its All tab, edit the Custom Id field to hold the desired Record Id number, which must be unique. Repeat for each record to be renumbered.<\/li>\n<li>Select <em>Generate new record ids by copying Custom Id values<\/em>, then Perform Task and Close dialogue.<\/li>\n<li>To clear the Custom Id fields will require a Custom Query to display all the records with the Custom Id field, so that the entire column of values can be deleted. However, if this process is to be repeated regularly, then leave the values in place, so the first step above can be omitted.<\/li>\n<\/ul>\n<p>Use the <a href=\"https:\/\/pluginstore.family-historian.co.uk\/page\/plugin\/find-duplicate-custom-ids\">Find Duplicate Custom ID&#8217;s<\/a> plugin to ensure all your Custom Ids are unique.<\/p>\n<div class=\"gca-utility clearfix\"><\/div>\n<\/div><\/details><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","fh_version":[13,14,15,739],"skill_level":[18,17],"topic":[101],"class_list":["post-10971","kb_article","type-kb_article","status-publish","hentry","fh_version-v4","fh_version-v5","fh_version-v6","fh_version-v7","skill_level-advanced","skill_level-intermediate","topic-records-window"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/10971","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=10971"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=10971"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=10971"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=10971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}