* Expression for Residence / Census

Questions about creating, customising and using diagrams and charts
Post Reply
avatar
DaveV
Gold
Posts: 14
Joined: 07 Mar 2024 00:18
Family Historian: V7

Expression for Residence / Census

Post by DaveV »

I have been trying to add icons for Census to my chart but most of them have been imported from Ancestry through treeshare/Roots magic and therefore dont show as Census but as Residence. I think that means I have to find the a residence with the citation for the year in question ( 1950 for my example)
I cant figure out what expression to use for this. I think I have to find residence and year, but I cant even get just year to work from the citation.
I have tried using =ContainsText(%INDI.RESI.SOUR>TITL%,"1950",STD) but that doesnt seen to work.
I will add a screen shot to help clarify what I am looking for.
Attachments
example.JPG
example.JPG (65.94 KiB) Viewed 335 times
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression for Residence / Census

Post by tatewise »

Would you be interested in converting those Residence facts to Census events?
If so then I can explain how to use the Change Any Fact Tag plugin.

It is a common mistake to think =ContainsText(...) will search a nominated field. It only searches records.
So use the =FindText(...) function instead or simply test the Title equals 1950 United States Federal Census.
e.g.
=IsTrue( FindText( %INDI.RESI.SOUR>TITL%, "1950" ) > 0 )

=IsTrue( %INDI.RESI.SOUR>TITL% = "1950 United States Federal Census" )

However, those expressions test the 1st Residence (RESI), so for the Facts in your screenshot will never be true.

You need to select the Residence fact by year using %INDI.RESI[year=1950].SOUR>TITL%
But if you have any genuine Residence facts also with a Date in 1950 that still may not work.
That is why converting to Census events may be a better option.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
DaveV
Gold
Posts: 14
Joined: 07 Mar 2024 00:18
Family Historian: V7

Re: Expression for Residence / Census

Post by DaveV »

Thanks for the detailed explaination.

yes I would be interested in trying to change the Residence to Census. That would be my preference ( as long as I can figure out the proceedure)
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression for Residence / Census

Post by tatewise »

BTW:
Topics Get a list of people from Project 1 to Project 2 (22858) and Search and delete duplicate Events? (22844) seem to be incomplete!

Two plugins can help you change Fact types.

If you only have a few Residence facts that need to be changed to Census events use the Change Specific Fact Tag plugin repeatedly on each Residence fact.

If you have many Residence facts to change then use the Change Any Fact Tag plugin to change them in bulk.
See the Help for Usage Example 2 ~ Residence to Census and if you need further advice then ask again.
I notice you have not used explicit dates but just the year, so that might complicate the filtering needed.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
DaveV
Gold
Posts: 14
Joined: 07 Mar 2024 00:18
Family Historian: V7

Re: Expression for Residence / Census

Post by DaveV »

Thank you Mike that was very helpful I was able to change in bulk using the plugin you suggested and the help link you also provided. I'm very slowly getting this project cleaned up and learning a lot along the way.
User avatar
tatewise
Megastar
Posts: 28436
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expression for Residence / Census

Post by tatewise »

OK, so now to add an Icon to your Diagrams for Census events you can use:
=Exists( %INDI.CENS[year=1950]% ) with a different year for each decade.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
DaveV
Gold
Posts: 14
Joined: 07 Mar 2024 00:18
Family Historian: V7

Re: Expression for Residence / Census

Post by DaveV »

Got it. Thanks!
Post Reply