* How do I correct a flag expression
- davidm_uk
- Megastar
- Posts: 740
- Joined: 20 Mar 2004 12:33
- Family Historian: V7
- Location: St Albans, Hertfordshire, UK
How do I correct a flag expression
Just come across a minor glitch when trying to run an old (v3) query, which lists my ancestors, with what flags are set for birth/marriage/death certs and census entries.
For all census entries except 1911 the expression (in the columns tab for the query) is %INDI._FLGS.__CENSUS_UK_1841%
however for 1911 when I insert it from the fields pane on the left it appears as %INDI._FLGS.__CENSUS_UK_191%, ie missing the last 1 in 1911.
All the flags work ok (in diagrams etc), but I'd like to tidy this up in case it bites me later on, but I can't find out how. It would also help to understand why it happened - probably my mistyping, but where/when?
Thanks, David.
ID:4477
For all census entries except 1911 the expression (in the columns tab for the query) is %INDI._FLGS.__CENSUS_UK_1841%
however for 1911 when I insert it from the fields pane on the left it appears as %INDI._FLGS.__CENSUS_UK_191%, ie missing the last 1 in 1911.
All the flags work ok (in diagrams etc), but I'd like to tidy this up in case it bites me later on, but I can't find out how. It would also help to understand why it happened - probably my mistyping, but where/when?
Thanks, David.
ID:4477
-
nsw
How do I correct a flag expression
A flag tag (which is the part after the .) e.g. __CENSUS_UK_191 can only be a maximum of 15 characters long so all your other census flags (e.g. __CENSUS_UK_1841) are actually invalid as they have 16 chars. Sadly I suspect that they were created by an old version of Gedcom Census. Initially I didn't know that flag tags had a maximum length and this was only explained to me later by Simon Orde and fixed immediately afterwards in a Gedcom Census update. My guess would be that you created the long flag tags in the version that had this issue but created the 1911 flag in a later Gedcom Census which correctly truncated the flag name down to match the 15 character maximum. I actually discuss this same point in this forum thread talking about Ancestral Sources.
As I said in the thread (slightly modified to match your flag names):
Apologies for the inconvenience that the old version of Gedcom Census caused but hopefully you should find it easy to fix. Drop me an email if you need more help with it.
Best wishes
Nick
P.S. This maximum length can cause real issues, if for example you had a flag called Census Canada 1881 then the flag tag would be __CENSUS_CANADA so you wouldn't then be allowed to have any other flags which start with Census Canada as they would cause the same flag tag to be used. This is why in Ancestral Sources the default flag names use a format starting with the year then country to try to keep the tag unique: e.g. a flag name of '1881 Canada Census' which would generate a flag tag of: __1881_CANADA_C
As I said in the thread (slightly modified to match your flag names):
You would then need to change your query to use these same names.I think the easiest thing to do if you find you have this problem is to search and replace through the GEDCOM file using a text editor such as notepad. Having first made a backup of course. Using the example above I would search for __CENSUS_UK_1901 and replace with __CENSUS_UK_190 (truncated to 15 chars).
Apologies for the inconvenience that the old version of Gedcom Census caused but hopefully you should find it easy to fix. Drop me an email if you need more help with it.
Best wishes
Nick
P.S. This maximum length can cause real issues, if for example you had a flag called Census Canada 1881 then the flag tag would be __CENSUS_CANADA so you wouldn't then be allowed to have any other flags which start with Census Canada as they would cause the same flag tag to be used. This is why in Ancestral Sources the default flag names use a format starting with the year then country to try to keep the tag unique: e.g. a flag name of '1881 Canada Census' which would generate a flag tag of: __1881_CANADA_C
- davidm_uk
- Megastar
- Posts: 740
- Joined: 20 Mar 2004 12:33
- Family Historian: V7
- Location: St Albans, Hertfordshire, UK
How do I correct a flag expression
Hi Nick,
Many thanks for your comprehensive reply.
I'll have a play with a copy of my GED file along the lines you've suggested to see if I can resolve the problem.
Cheers.
David
Many thanks for your comprehensive reply.
I'll have a play with a copy of my GED file along the lines you've suggested to see if I can resolve the problem.
Cheers.
David
- davidm_uk
- Megastar
- Posts: 740
- Joined: 20 Mar 2004 12:33
- Family Historian: V7
- Location: St Albans, Hertfordshire, UK
How do I correct a flag expression
Right had a ago at modifying a copy of my GED file with notepad, and thought I'd go the whole way and change all the census flag tags to the form __yyyy_UK_C to be consistent with Ancestral Sources. I didn't change the tag description in the GED file, just the tag 'value'.
This seems to have worked ok and all of the 1841 to 1901 flags display correctly on diagrams.
However I now have two 'Census UK 1911' flags listed in all the various drop down selection boxes (eg under Edit/Record Flags) and I can't find out how to get rid of the wrong one (or even work out which is the wrong one). I'd be happy to delete both and then recreate one, and even delete all the 1911 tags from the GED file and re enter them (I've saved a list of all the relevant people).
I've double checked the GED file and there are none of the old style tags left in there, and I can't see anything in the 'C:Documents and SettingsAll UsersApplication DataCalico PieFamily Historian' folder.
Help please!
This seems to have worked ok and all of the 1841 to 1901 flags display correctly on diagrams.
However I now have two 'Census UK 1911' flags listed in all the various drop down selection boxes (eg under Edit/Record Flags) and I can't find out how to get rid of the wrong one (or even work out which is the wrong one). I'd be happy to delete both and then recreate one, and even delete all the 1911 tags from the GED file and re enter them (I've saved a list of all the relevant people).
I've double checked the GED file and there are none of the old style tags left in there, and I can't see anything in the 'C:Documents and SettingsAll UsersApplication DataCalico PieFamily Historian' folder.
Help please!
-
nsw
How do I correct a flag expression
I'm not sure if its a good idea to not change the flag names too to match the tags. Although it may be OK, its a bit risky as Family Historian only creates flag tags that match the name.
You could try to delete the flag(s) using Tools->Work with lists and flags (use option 3). Once the flag is removed from everyone close Family Historian and then re-open it and the flag should disappear from lists.
You could try to delete the flag(s) using Tools->Work with lists and flags (use option 3). Once the flag is removed from everyone close Family Historian and then re-open it and the flag should disappear from lists.
- davidm_uk
- Megastar
- Posts: 740
- Joined: 20 Mar 2004 12:33
- Family Historian: V7
- Location: St Albans, Hertfordshire, UK
How do I correct a flag expression
With a few false starts I managed to get it sorted.
It seems that FH uses the first occurrence in the GED file of a tag+name combination when applying subsequent settings of that flag.
So having deleted all the old and new 1911 entries, I just created a new flag in FH called Census UK 1911 for the first person in the GED file, saved the file, closed FH, edited the GED file with notepad to change the tag part to __1911_UK_C, saved the file, opened FH again, and then all subsequent uses of that flag resulted in the new tag being applied, but with the Census UK 1911 name appearing in the lists etc.
I then used the named list that I'd created before I started all this exercise to apply that flag to all the correct people.
Seems to be OK so far, but dunno what will happen when I next open Ancestral Sources. Does it keep it's own record of tag+name, or does it pick it up from the GED file?
Now I sort of understand the process I might (on a rainy day with nothing better to do) have a go at renaming all the descriptions to match the tags, as suggested by Nick, 'cos sods law says that some future upgrade of FH (or Ancestral Sources) will object to what I've done, and by then I'll have forgotten how to unravel it all!
It seems that FH uses the first occurrence in the GED file of a tag+name combination when applying subsequent settings of that flag.
So having deleted all the old and new 1911 entries, I just created a new flag in FH called Census UK 1911 for the first person in the GED file, saved the file, closed FH, edited the GED file with notepad to change the tag part to __1911_UK_C, saved the file, opened FH again, and then all subsequent uses of that flag resulted in the new tag being applied, but with the Census UK 1911 name appearing in the lists etc.
I then used the named list that I'd created before I started all this exercise to apply that flag to all the correct people.
Seems to be OK so far, but dunno what will happen when I next open Ancestral Sources. Does it keep it's own record of tag+name, or does it pick it up from the GED file?
Now I sort of understand the process I might (on a rainy day with nothing better to do) have a go at renaming all the descriptions to match the tags, as suggested by Nick, 'cos sods law says that some future upgrade of FH (or Ancestral Sources) will object to what I've done, and by then I'll have forgotten how to unravel it all!
-
nsw
How do I correct a flag expression
Actually having thought about it, I suspect that Ancestral Sources won't like the flag names not matching the flag tags, so best not to use the flag features of AS until you've sorted out the names.davidm_uk said:
Seems to be OK so far, but dunno what will happen when I next open Ancestral Sources. Does it keep it's own record of tag+name, or does it pick it up from the GED file?
- davidm_uk
- Megastar
- Posts: 740
- Joined: 20 Mar 2004 12:33
- Family Historian: V7
- Location: St Albans, Hertfordshire, UK
How do I correct a flag expression
All now corrected, and seems to be working OK in conjunction with Ancestral Sources.
Thank heavens for Named Lists, which I used to record who had cencus flags set, then deleted all the old flags and set up the new flags for one person (me - being the first person in the GED file) which I subesquently deleted after using the named lists to recreate all the correct entries.
A useful learning exercise about named lists, tags and tag names though!
Thanks to Nick for his help and advice during all this.
David
Thank heavens for Named Lists, which I used to record who had cencus flags set, then deleted all the old flags and set up the new flags for one person (me - being the first person in the GED file) which I subesquently deleted after using the named lists to recreate all the correct entries.
A useful learning exercise about named lists, tags and tag names though!
Thanks to Nick for his help and advice during all this.
David