Page 2 of 2

Re: How to not mark the deceased without dates as living

Posted: 28 Feb 2018 18:11
by Jane
In the TNG settings you can select if TNG uses the living flag.

When you import it sets the flag based on the settings in the import, but they can be changed after import, easily enough either manually or using sql to set them all to 0 and then set the living to living.

Re: How to not mark the deceased without dates as living

Posted: 28 Feb 2018 19:12
by tatewise
So, to try and summarise and simplify what is getting overly complex.
Just add empty Death Events to Individual records in FH (which will be retained indefinitely).
When exported to TNG those Individuals are NOT hidden as required. Is that correct?

Don't mess around with GEDCOM.
Don't know how you got 1 DEAT Y to show "Y" in the Death Date field because FH does NOT do that.
So wipe that from your mind.

The only outstanding issue is in which FH Diagrams & Reports you want to hide empty Death Events.

Re: How to not mark the deceased without dates as living

Posted: 28 Feb 2018 20:48
by capnkeith
I would like all diagrams and reports to work without empty death events.

If the TNG SQL settings can be over-ridden, that sounds the better option.

Rather than forcing one M/C to make alterations to get the other to work properly.

As always thanks for your efforts.

Regards

Re: How to not mark the deceased without dates as living

Posted: 28 Feb 2018 22:50
by tatewise
Agreed.
It needed an experienced TNG user to identify the TNG settings that needed adjusting.
So, no changes are needed to FH at all.

I may add that cross-reference to the Export Gedcom File Plugin advice for TNG.

Re: How to not mark the deceased without dates as living

Posted: 28 Feb 2018 22:58
by Jane
capnkeith wrote:Hi Jane,

My issue is not the living, it is those that are dead and have been for some considerable while, but are identified as living because they have no birth or death record. Are you telling me that you can separate them from the genuine living?

Regards
If you have read the link I posted you can see that on the import the living flag is set , you can set it manually in TNG or just set the field using SQL as I explained. So you can clear all the living fields in TMG and just set the ones you want.

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 09:07
by capnkeith
Jane,

It's a while since I used MYSQL and then it was just adding or deleting product types and codes etc into the tables. So first I need to refresh my way around in the tables etc. I have accessed MYSQL and can see the column of "living" and how your code would work but how do I go about clearing those wrongly set (around 1500) do I clear everything and then set living on the ones I want. Is it possible to do it with a Query or Plugin in FH. Which comes first, I will need guidance.

Regards

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 09:23
by Jane
Just zero all the "Living" column

Code: Select all

UPDATE `tng_people` set `living` = '0' WHERE `gedcom` = 'Mullins'
Then set the ones you want. Whether it's worth writing a plugin will depend on how often you want to upload.

If it's only occasionally, Just use the query attached and then copy the results to a text editor and remove the new lines and the last comma before using in the SQL I already posted.
Living Record IDs for TNG.fhq
(588 Bytes) Downloaded 210 times

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 10:41
by capnkeith
Hi Jane,

What is your query looking for. I made a named list last night of all those living, manually, can it pick that up?

Regards

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 10:52
by capnkeith
Dont worry I've worked it out

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 11:10
by capnkeith
Is there a way of copying a query result without it putting each line in " " inverted commas. Notepad Find doesn't seem to work on punctuation!

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 12:04
by Valkrider
Keith

Use the free Notepad++ it does work on any character.

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 12:08
by Jane
Why make a Named list? Any way just set the Living flag using the Is in List query and set the flag from the Gear wheel.

You will make life much easier on yourself if you use a Text editor like NotePad++ or PSPad. That said Notepad has no problem replacing " with nothing.
2018-03-01_120914.png
2018-03-01_120914.png (5.44 KiB) Viewed 14172 times

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 12:32
by capnkeith
I asked it to find " and it said it couldn't find ''' I gave up and did it by hand but I will look for one of the others you recommend.

Thanks for your help it is now all working, just checking and finding a few without birthdays that I missed.

Regards

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 18:26
by Jane
fh_set_living.php

I have written a quick PHP script which you can upload to your TNG folder (I recommend deleting or renaming it when not in use).

If you call it and enter your gedcom name and the copied results from the Query it will run the two SQL statements to clear the ids and set the ones you want, you could also just type them in if you really wanted to (it removes the double quotes and the trailing comma , for you).

Re: How to not mark the deceased without dates as living

Posted: 01 Mar 2018 19:19
by capnkeith
Thanks I'll give it a go next time I upload a gedcom, I've put five trees on there at the moment so it might not be too long. I've disposed of the named list and just flagged all the living.

Regards

Re: How to not mark the deceased without dates as living

Posted: 03 Mar 2018 14:30
by capnkeith
Jane,

I've just tried it and it works a treat. Thanks very much.

Regards

Re: How to not mark the deceased without dates as living

Posted: 03 Mar 2018 14:54
by Jane
Good news. I have add the Query and the script to

fhugdownloads:contents:utility_the_next_generation#setting_the_living_flag|> TNG - Setting the Living Flag

Re: How to not mark the deceased without dates as living

Posted: 25 Jun 2019 20:00
by capnkeith
Hi Jane,

I know you are away on your hols soon so if you have no time please don't worry this can wait.
I have just tried to run fh_set_living.php and got this error? Does it mean anything to you?

Query: UPDATE tng_people SET living = 1 WHERE personID in ()

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

Regards

Re: How to not mark the deceased without dates as living

Posted: 26 Jun 2019 07:09
by Jane
Did you paste all the ids into the form?

Re: How to not mark the deceased without dates as living

Posted: 26 Jun 2019 08:19
by capnkeith
It's been a while since I made an update to TNG and I think I might have done something in the wrong order. I cannot remember how to remove the quotes or comma in Notepad. I'll have another go this morning.

Re: How to not mark the deceased without dates as living

Posted: 26 Jun 2019 09:55
by capnkeith
I think I have corrected all my errors
I hadn't used a Std UTF8 gedcom
Or pasted the IDs into the form - they look like this now 'I7178' with " ", deleted.

But none of the Living Flags have been set.

What have I missed?

I don't know but I just loaded the ids straight from the query and it now works. The only thing I can see is perhaps I should not have removed the comma.

Regards

Re: How to not mark the deceased without dates as living

Posted: 27 Jun 2019 07:00
by Jane
Yes it needs the commas.

I could probably improve the php script, but I don't have time at the moment sorry.

Re: How to not mark the deceased without dates as living

Posted: 27 Jun 2019 08:26
by capnkeith
Not a problem it's all done and working, thanks. If I used it more often I wouldn't forget how to use it.

Regards