* Expressions and Flag Questions

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
Chrisv
Famous
Posts: 150
Joined: 18 Mar 2022 17:00
Family Historian: V7
Location: Savannah, GA, USA

Expressions and Flag Questions

Post by Chrisv » 02 Mar 2023 16:28

I have a flag called FindaGrave. Is there an expression I can use that will check this Flag if there is a Burial Event listed?

Also, for a different challenge; I am using the following expression to list a Census year if there is a Census Fact entered:
%INDI.CENS[YEAR=1850].DATE:YEAR%
and this expression to list a Population Register year if there is an Pop. Register Fact entered:
%INDI._ATTR-POP_REGISTER_NL[YEAR=1850].DATE:YEAR%
Is it possible to combine the two expressions to show the year if either one or the other Fact occurs?
Thank You!

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expressions and Flag Questions

Post by tatewise » 02 Mar 2023 16:50

Yes:
=IsTrue( Exists(%INDI._FLGS.__FINDAGRAVE%) and Exists(%INDI.BURI%) )

=CombineText( , %INDI.CENS[year=1850].DATE:YEAR%, , %INDI._ATTR-POP_REGISTER_NL[year=1850].DATE:YEAR% )
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Chrisv
Famous
Posts: 150
Joined: 18 Mar 2022 17:00
Family Historian: V7
Location: Savannah, GA, USA

Re: Expressions and Flag Questions

Post by Chrisv » 02 Mar 2023 19:02

Thank you Mike.
I must be doing something wrong, because I get a warning that says "Data Reference is invalid, or not valid for this context".
I'm suppose to be plugging these into the Data Reference field for the Flag on the first one and in the Census Data Reference field for the other. Is that correct?
Attachments
Census & Pop. Register.PNG
Census & Pop. Register.PNG (103.54 KiB) Viewed 328 times
FindaGrave.PNG
FindaGrave.PNG (134.6 KiB) Viewed 328 times

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Expressions and Flag Questions

Post by tatewise » 02 Mar 2023 20:34

Sorry, I thought you wanted Expressions that would work in a Query or Records Window Column or Report or Diagram.
It is a good idea to specify the context in which you want to use such things.

They are totally unsuitable for customising Property Box fields because (strangely) they only allow Data References and not any Expressions or Functions.

You can add the FindAGrave flag using %INDI._FLGS.__FINDAGRAVE% as you have for FamSearch.
The other items can only be entered as separate Data References.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
Chrisv
Famous
Posts: 150
Joined: 18 Mar 2022 17:00
Family Historian: V7
Location: Savannah, GA, USA

Re: Expressions and Flag Questions

Post by Chrisv » 02 Mar 2023 20:36

I checked to make sure the expressions matched the Data References and tweaked the one expression to match my FINDAGR, and tried again, but I still get the same error. Any idea what I'm doing wrong? See below for updated expression and my Data References:

=IsTrue( Exists(%INDI._FLGS.__FINDAGR%) and Exists(%INDI.BURI%) )

=CombineText( , %INDI.CENS[year=1850].DATE:YEAR%, , %INDI._ATTR-POP_REGISTER_NL[year=1850].DATE:YEAR% )
Attachments
My Data Ref.PNG
My Data Ref.PNG (48.5 KiB) Viewed 307 times

User avatar
Chrisv
Famous
Posts: 150
Joined: 18 Mar 2022 17:00
Family Historian: V7
Location: Savannah, GA, USA

Re: Expressions and Flag Questions

Post by Chrisv » 02 Mar 2023 20:40

Sorry Mike, I think our posts were sent at the same time.
Okay, sorry about not specifying the final use. :oops: , but now I have the expressions to use in the other areas, which will help out also.
Thank you very much!

Post Reply