* Property Box - Starred 'fact flags' on births/born events
Property Box - Starred 'fact flags' on births/born events
Hi.
I have a situation where all the births/born events now appear to have the starred/preferred fact flag setting and I'm now wondering if I could switch these off back to the default setting.
From my recollection, the only time I've used the preferred fact flag is when I've used it to select a preferred occupation.
So, I'm somewhat confused how this occurred.
Hopefully, someone may be know the answer.
Thank you.
Mike
I have a situation where all the births/born events now appear to have the starred/preferred fact flag setting and I'm now wondering if I could switch these off back to the default setting.
From my recollection, the only time I've used the preferred fact flag is when I've used it to select a preferred occupation.
So, I'm somewhat confused how this occurred.
Hopefully, someone may be know the answer.
Thank you.
Mike
- Attachments
-
- Property Window - Births starred.png (57.06 KiB) Viewed 369 times
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
Those Preferred Fact Flags can usually only be added one by one manually.
I have helped a user to create a plugin to set them all automatically in Handling Fact Flags in a plugin (22153).
But without using a plugin they can only be set by hand.
I have helped a user to create a plugin to set them all automatically in Handling Fact Flags in a plugin (22153).
But without using a plugin they can only be set by hand.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Property Box - Starred 'fact flags' on births/born events
Hi Mike,
I definitely haven't updated each record one by one, and especially not on the birth/born events.
Nevertheless, I'll have a look at the plugin you've made for another user, or reset those one-by-one.
Thank you for your help.
I definitely haven't updated each record one by one, and especially not on the birth/born events.
Nevertheless, I'll have a look at the plugin you've made for another user, or reset those one-by-one.
Thank you for your help.
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
If you need help adjusting the plugin to delete those Preferred Fact Flags instead of setting them then let me know.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Property Box - Starred 'fact flags' on births/born events
Hi Mike,
I would very much like to take you up on your kind offer, with not having any coding skills at all.
In the meantime, I had created a quick query to switch off the flags, however with 5000 records it's a bit of a b. breaker.
Thanks, Mike - I appreciate this a lot.
I would very much like to take you up on your kind offer, with not having any coding skills at all.
In the meantime, I had created a quick query to switch off the flags, however with 5000 records it's a bit of a b. breaker.
Thanks, Mike - I appreciate this a lot.
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
I presume your Query listed 5,000 Birth Events with the Preferred Flag.
So selecting all 5,000 entries in the Preferred Flag column of the Result Set was taking too long?
Once they were all selected though a simple Delete key click would delete them all.
I am fascinated by how 5,000 Birth Events gained the Preferred Flag manually!
However, here is the plugin script that will delete them all.
Use Tools > Plugins > More >> New... to open an empty New Plugin window.
Then click SELECT ALL below and Copy & Paste the script into the New Plugin window and click Go.
Once all the flags have gone, click X to Close that window and do not save changes.
So selecting all 5,000 entries in the Preferred Flag column of the Result Set was taking too long?
Once they were all selected though a simple Delete key click would delete them all.
I am fascinated by how 5,000 Birth Events gained the Preferred Flag manually!
However, here is the plugin script that will delete them all.
Use Tools > Plugins > More >> New... to open an empty New Plugin window.
Then click SELECT ALL below and Copy & Paste the script into the New Plugin window and click Go.
Once all the flags have gone, click X to Close that window and do not save changes.
Code: Select all
local ptrIndi = fhNewItemPtr()
ptrIndi:MoveToFirstRecord("INDI")
while ptrIndi:IsNotNull() do -- Check each Individual
local ptrBirt = fhGetItemPtr(ptrIndi,"~.BIRT")
while ptrBirt:IsNotNull() do -- Check each Birth Event
local ptrFlag = fhGetItemPtr(ptrBirt,"~._FLGS")
if ptrFlag:IsNotNull() then -- Check if Preferred Flag exists
local ptrPref = fhGetItemPtr(ptrFlag,"~.__PREFERRED")
if ptrPref:IsNotNull() then -- Delete Preferred Flag
local isOk = fhDeleteItem(ptrPref)
zz=0
end
end
ptrBirt:MoveNext("SAME_TAG")
end
ptrIndi:MoveNext()
end
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Property Box - Starred 'fact flags' on births/born events
Thank you Mike,
I will try this is the morning and feed back.
A few days ago, another member had asked about preferred flags and you had scripted a plug in text. I know I copied that text into the plug in editor as an experiment. I'm guessing that was when the issue began but I hadn't realised the preferred flag had gone through my individuals. I have no other explanation than that.
Yes, You could say I've learnt my lesson by not using it on a test file. I hope this sheds some light on it.
Without the new code, I would of gone through record by record, but hopefully, this will allow me get rid of the issue far quicker. Thank you for helping me out.
What I'm wondering is how the 'non-standard flags', like this, aren't able to added/removed in the normal way in a query (i.e. set flag on row records/clear flag on row records). In your opinion, is this an oversight by Calico Pie ?
I will try this is the morning and feed back.
A few days ago, another member had asked about preferred flags and you had scripted a plug in text. I know I copied that text into the plug in editor as an experiment. I'm guessing that was when the issue began but I hadn't realised the preferred flag had gone through my individuals. I have no other explanation than that.
Yes, You could say I've learnt my lesson by not using it on a test file. I hope this sheds some light on it.
Without the new code, I would of gone through record by record, but hopefully, this will allow me get rid of the issue far quicker. Thank you for helping me out.
What I'm wondering is how the 'non-standard flags', like this, aren't able to added/removed in the normal way in a query (i.e. set flag on row records/clear flag on row records). In your opinion, is this an oversight by Calico Pie ?
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
Re: Property Box - Starred 'fact flags' on births/born events
If you suspect this only happened a few days ago, and you haven't done too much work on your tree since then, it might be worth restoring one of the automatic snapshot backups to see if that solves the issue for you. If you're not sure about snapshots, there is plenty of help in the FH help and lots of topics in the forum too.
Adrian Cook
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
Researching Cook, Summers, Phipps and Bradford, mainly in Wales and the South West of England
- ColeValleyGirl
- Megastar
- Posts: 4850
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
Worth adding to the KB as a code snippet, Mike?
Helen Wright
ColeValleyGirl's family history
ColeValleyGirl's family history
Re: Property Box - Starred 'fact flags' on births/born events
Good morning Mike,
I've used your new script on an exported gedcom file and the error message is attached below.
I will let you decide if you have the time to review the script. Equally, I am ok to go through my query and switch off the flags.
I've used your new script on an exported gedcom file and the error message is attached below.
I will let you decide if you have the time to review the script. Equally, I am ok to go through my query and switch off the flags.
Thank you for your suggesting this possible solution. Unfortunately, I have made some other changes to the project, so reverting back to an earlier snapshot will lose that bit of work. I think I would prefer to carry on with my current project as things are. I have so much housekeeping to do on it anyway (as a labour of love).ADC65 wrote :
If you suspect this only happened a few days ago, and you haven't done too much work on your tree since then, it might be worth restoring one of the automatic snapshot backups to see if that solves the issue for you. If you're not sure about snapshots, there is plenty of help in the FH help and lots of topics in the forum too.
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
The explanation why that won't work is that they are NOT Record Flags but Fact Flags.
You can write a Query that lists all the Birth Event Preferred Fact Flags in a Result Set column, then by selecting the entire column they can all be deleted at a stroke. I thought that was what you had attempted but found selecting the column of 5,000 entries was a bit tedious.
It seems that you may not have copied the script faithfully. I have just copied it and it runs perfectly.I've used your new script on an exported gedcom file and the error message is attached below.
I will let you decide if you have the time to review the script. Equally, I am ok to go through my query and switch off the flags.
The moral of this exercise is don't experiment with plugin scripts on live projects unless you are sure you know what you are doing.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Property Box - Starred 'fact flags' on births/born events
Hi Mike,
Yes, you are correct in that I experimented on a live project. Wrongly, of course.
I have confidence I copied, faithfully, both sets of plug in scripts.
Appreciate your input and support as ever - Thank you.
Since it was my mistake, I'll fix it over time. No problem doing that.
Yes, you are correct in that I experimented on a live project. Wrongly, of course.
I have confidence I copied, faithfully, both sets of plug in scripts.
Appreciate your input and support as ever - Thank you.
Since it was my mistake, I'll fix it over time. No problem doing that.
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs
- tatewise
- Megastar
- Posts: 27074
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Property Box - Starred 'fact flags' on births/born events
If you want to investigate the plugin script then paste a copy of what you have in the New Plugin window so I can review it.
It does not need a lot of time to fix it with a Query.
Create an Individual Query with a Column using the Expression: %INDI.BIRT[1]._FLGS.__PREFERRED%
In the Result Set click the column heading so all the Y entries are at the top.
Select every Y in that column, hit the keyboard Delete key and OK the warning.
You can do that in batches if you don't want to select all 5,000 cells in one go.
It does not need a lot of time to fix it with a Query.
Create an Individual Query with a Column using the Expression: %INDI.BIRT[1]._FLGS.__PREFERRED%
In the Result Set click the column heading so all the Y entries are at the top.
Select every Y in that column, hit the keyboard Delete key and OK the warning.
You can do that in batches if you don't want to select all 5,000 cells in one go.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Re: Property Box - Starred 'fact flags' on births/born events
Hi Mike,
Thanks again for the delete in batches proposal. Great stuff. It will clear the remaining flags.
Please note that I had deleted the initial plug in text (a string of errors on my part, admittedly) otherwise I would have posted this back and sought your guidance for a fix. Then it would have been documented there for others to benefit from.
I appreciate all your help, and apologize for the time you have taken in preparing the follow up script.
Lessons learnt for me, I think.
Thanks again for the delete in batches proposal. Great stuff. It will clear the remaining flags.
Please note that I had deleted the initial plug in text (a string of errors on my part, admittedly) otherwise I would have posted this back and sought your guidance for a fix. Then it would have been documented there for others to benefit from.
I appreciate all your help, and apologize for the time you have taken in preparing the follow up script.
Lessons learnt for me, I think.
Mike Burditt researching BURDITTs of Leic/Northants and WEBSTERs of Lancs