* Finding Expressions

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
avatar
cosfordparker
Newbie
Posts: 4
Joined: 18 Apr 2021 22:13
Family Historian: V7

Finding Expressions

Post by cosfordparker » 17 Jun 2023 16:59

I've read the material on expressions and I think I get it - anyway, I'm not as wary of queries as I was. :) But I still don't know how to find the specific expressions I need in the list.

Example: I want to modify the standard Ahnentafel query to include columns for parents' ahnentafel numbers. I found the ahnentafel expression is categorized as Relationship. I manually searched the entire list, checking each Relationship subheading. (Is there a better way?) Didn't find what I need. I tried copying the expression from elsewhere in the original query, but that just repeated the original column data.

My head hurts from banging it against the wall! Help would be so appreciated! --cosfordparker

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

Re: Finding Expressions

Post by tatewise » 17 Jun 2023 17:27

Perhaps an explanation of the structure of Expressions might help.
See FHUG > Knowledge Base > Understanding Expressions which has cross-references to their components and FH help pages.

Expressions are composed of Data References and Functions...

Data References refer to data items in your Project such as current person %INDI% or a parent such as %INDI.~FATH>% or %INDI.~MOTH>% as explained in Understanding Data References.

Functions perform operations on those data items and return a result such as Ahnentafel numbers =AhnentafelNumber(...) as explained in Understanding Functions.

=AhnentafelNumber( FileRoot(), %INDI%, 1 ) returns the closest Ahnentafel number of the current person relative to the defined File Root person.

=AhnentafelNumber( FileRoot(), %INDI.~FATH>%, 1 ) returns the closest Ahnentafel number of the current person's father relative to the defined File Root person.

The full list of Functions is in the Help > General Topics > Advanced Topics > Understanding Functions > Functions (all) and includes AhnentafelNumber and FileRoot.

If any of the above is not clear then please post again with details of what you do not understand.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
cosfordparker
Newbie
Posts: 4
Joined: 18 Apr 2021 22:13
Family Historian: V7

Re: Finding Expressions

Post by cosfordparker » 24 Jun 2023 18:06

Thank you, Tatewise - lots to absorb, but very helpful. I have two issues:

1. Currently, when I need an expression, I manually search the extensive, categorized, nested list, line by line. Is there a more efficient way to find a specific expression, even when I don't know how it might be categorized?

2. I need Ahnentafel to be a universal, visible data element, like name and gender, automatically populated where appropriate. I'm unsuccessful in making that happen and suspect those are deeper coding issues than a user can accomplish. So, as a workaround, I use Custom ID as the Ahnentafel field and manually populate it. Not terribly effective, but it's something.

I'm thinking I need to learn to program before I become Find a Grave data. :lol: Thanks again for your help! -- cosfordparker

User avatar
BillH
Megastar
Posts: 2179
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Finding Expressions

Post by BillH » 24 Jun 2023 18:16

cosfordparker wrote:
24 Jun 2023 18:06
2. I need Ahnentafel to be a universal, visible data element, like name and gender, automatically populated where appropriate.
I haven't really followed this thread so not sure if this would be of any help.

You can add the Ahnentafel number to the caption at the top of the Poperty Box like this:

image1.jpg
image1.jpg (47.05 KiB) Viewed 793 times

Bill

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

Re: Finding Expressions

Post by tatewise » 24 Jun 2023 19:26

cosfordparker wrote:
24 Jun 2023 18:06
1. Currently, when I need an expression, I manually search the extensive, categorized, nested list, line by line. Is there a more efficient way to find a specific expression, even when I don't know how it might be categorized?
I think you are misusing the word 'expression' when you really mean 'function'.
As I tried to explain earlier, an Expression is composed of Data References and Functions.
I'm afraid the only way to discover suitable Functions is to spend some time becoming familiar with the list.
cosfordparker wrote:
24 Jun 2023 18:06
2. I need Ahnentafel to be a universal, visible data element, like name and gender, automatically populated where appropriate. I'm unsuccessful in making that happen and suspect those are deeper coding issues than a user can accomplish. So, as a workaround, I use Custom ID as the Ahnentafel field and manually populate it. Not terribly effective, but it's something.
Unfortunately, the fields in the Property Box cannot be customised with Functions as only Data References are allowed.
Vote for Wish List allow fields with qualifiers and function results on property box tabs to add that feature.
Bill has identified the one place in the Property Box that does allow Functions.
Click the Property Box cog Menu > Options... and then the Captions... button to edit the Individual Caption and insert the =Ahnentafel(...) funcion.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
cosfordparker
Newbie
Posts: 4
Joined: 18 Apr 2021 22:13
Family Historian: V7

Re: Finding Expressions

Post by cosfordparker » 26 Jun 2023 15:26

Thank you, both!

User avatar
Jane
Site Admin
Posts: 8440
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Finding Expressions

Post by Jane » 27 Jun 2023 13:31

If you use the online version of the help and go to the all functions page
https://www.family-historian.co.uk/help ... n_all.html
You can easily use CTRL-F to search for useful words.
Also the online help search tends to be more helpful that the Microsoft search built into the standard help.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."

avatar
BevSmallwood
Diamond
Posts: 59
Joined: 14 Jul 2022 18:01
Family Historian: V7
Location: Wisconsin, USA

Re: Finding Expressions

Post by BevSmallwood » 28 Jun 2023 19:14

This looks really cool. Can you copy/paste the code you used? More to the point, how do I get it to only show on direct ancestors?
BillH wrote:
24 Jun 2023 18:16
cosfordparker wrote:
24 Jun 2023 18:06
2. I need Ahnentafel to be a universal, visible data element, like name and gender, automatically populated where appropriate.
I haven't really followed this thread so not sure if this would be of any help.

You can add the Ahnentafel number to the caption at the top of the Poperty Box like this:


image1.jpg


Bill

User avatar
BillH
Megastar
Posts: 2179
Joined: 31 May 2010 03:40
Family Historian: V7
Location: Washington State, USA

Re: Finding Expressions

Post by BillH » 28 Jun 2023 20:26

The data reference I use for just the Ahnentafel number is:

Code: Select all

[Ahentafel: =AhnentafelNumber( FileRoot(), %INDI%, 1 )] 
I'm not sure how (or if) you can make it show only for direct ancestors. There may be a way by checking if the number is blank or not.

Bill

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

Re: Finding Expressions

Post by tatewise » 28 Jun 2023 20:56

Use the =CombineText(...) function:
=CombineText( "[Ahentafel: ", AhnentafelNumber( FileRoot(), %INDI%, 1 ), "]" )

That only displays the prefix "[Ahentafel: " and suffix "]" if Ahnentafel(...) provides a number.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Gowermick
Megastar
Posts: 1629
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: Finding Expressions

Post by Gowermick » 29 Jun 2023 09:33

A point to remember, this only works for your direct ancestors if you are the root individual. I.e the expression is dynamic, so If you change the root, you will get results showing for non direct ancestors.

To get round this, I listed the Ahnentafel numbers for all my direct ancestors, then copied these into a custom ID field.
The custom ID is static, and doesn’t change even if I change the root.
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com

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

Re: Finding Expressions

Post by tatewise » 29 Jun 2023 10:00

To obtain the Ahnentafel Number relative to a specific person regardless of the File Root then use the =Record(...) function.
e.g.
AhnentafelNumber( Record( 321, "I" ), %INDI%, 1 )

where 321 is the Record Id number of the root person and "I" is the capital letter I for Individual record.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply