* Text Displayed for %FACT% Column in query results

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
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Text Displayed for %FACT% Column in query results

Post by shoshk » 16 Dec 2020 12:06

Is there anyway to control the text displayed for a %FACT% Column in query results?

For example, I have a To Do fact. I've added the fact to an individual with the value "Add 1911 census."

In the query results, this appears as "Add 1911 census." I would like to see "To Do: Add 1911 census."

Thanks,
Shosh
Shosh Kalson

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

Re: Text Displayed for %FACT% Column in query results

Post by tatewise » 16 Dec 2020 12:21

Yes, use =GetDisplayText(%FACT%,STD)
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Text Displayed for %FACT% Column in query results

Post by shoshk » 16 Dec 2020 12:23

But then the column is no longer clickable.
Shosh Kalson

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

Re: Text Displayed for %FACT% Column in query results

Post by tatewise » 16 Dec 2020 12:40

OK, you did not request that :D
You need to add a %FACT% buddy column immediately after/below using Type = Buddy.

See the Help (click F1 key) under Query Window: Columns Tab ~ Components of the Columns Tab - the Right-Hand Side ~ Type ~ Buddy.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Text Displayed for %FACT% Column in query results

Post by shoshk » 16 Dec 2020 13:04

What, in addition to everything else you do, you're not a mind reader? :lol:

OK, that works great. I've never used that feature before.

Only one problem, I'd like to be able to specify the output for GetDisplayText (similar to what I'm able to do in the property box). Can it be done?

Shosh
Shosh Kalson

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

Re: Text Displayed for %FACT% Column in query results

Post by tatewise » 16 Dec 2020 13:31

I'm not sure I understand what you mean by output as in the Property Box ~ do you mean the Sentence?

If so then use =FactSentence(%FACT%) which is another function from https://www.family-historian.co.uk/help ... n_all.html
Those are only the FH V6 Functions. See the FH V7 Help pages for even more...
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Text Displayed for %FACT% Column in query results

Post by shoshk » 16 Dec 2020 13:38

No, not the sentence. I mean the text that I define for the fact type Summary Template
Shosh Kalson

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

Re: Text Displayed for %FACT% Column in query results

Post by tatewise » 16 Dec 2020 14:03

Please always bee more specific. I am not a mind-reader :D
But the Summary Template does not usually include the Date as that is shown to the left in the Facts tab.
However, there seems to be no function that inherits the Summary Template but you can probably use the =FactText(...) function to get close.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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

Re: Text Displayed for %FACT% Column in query results

Post by tatewise » 17 Dec 2020 10:27

I have no idea why I suggested the =FactText(...) function as that cannot adapt to each Fact Label.
The only Fact Set Definition dependant function that comes close is =FactSentence(%FACT%).

So, if you don't use Narrative Reports, then design the Sentence Template to match the Summary Template for each Fact.
If you do use Narrative Reports, you will need two almost identical Fact Sets for the two variants of Sentence Template and by changing the order of those two Fact Sets will bring one or other Sentence Templates into view.

The only other method is to write a Plugin to produce a Result Set derived from the Fact Set definition files in the global C:\ProgramData\Calico Pie\Family Historian\Fact Types folder and the local Project ...fh_data\Fact Types folder.
OR you could try writing a Report Plugin.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Text Displayed for %FACT% Column in query results

Post by shoshk » 17 Dec 2020 10:49

I didn't know that the same tag could be defined in different tag sets (well, I guess I never thought about it).

Your solution to use the sentence template together with multiple fact sets is interesting. My intuition tells me that it could be useful in other situations.

BTW, I'm actually working with a plugin (Find Facts with Media). I "solved" my problem by using a conditional statement, but it probably doesn't cover all cases. For the moment, it works for me. However, I would prefer a solution which uses =FactSentence().

I'll put this on my list.

BTW, I have started playing with a Report Plugin. This is a brilliant addition to FH7! I find it interesting that nobody is talking about it.

Thanks,
Shosh
Shosh Kalson

Post Reply