* Custom queries

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.
avatar
Overloaded
Platinum
Posts: 43
Joined: 05 Feb 2012 02:37
Family Historian: None

Custom queries

Post by Overloaded » 06 Aug 2012 04:29

Have you ever used a function in a subtitle? I'm starting to conclude that it's not an option?

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

Custom queries

Post by tatewise » 06 Aug 2012 11:06

Try spelling the function Individual and NOT Individuall (double ll should be single l)

Also, contrary to my earlier posting, PeterR is correct in suggesting the Row filters must be:

Code: Select all

=IsSameItem(FactOwner(,1,MALES_FIRST),Individual(['Person']))
=IsSameItem(FactOwner(,2,MALES_FIRST),Individual(['Person']))
Yes, I have used functions in both Title and Subtitle > Custom and they work fine.
But you cannot use Date codes such as %#x at the same time in the same field.
I am using FH Version 5.0.7

avatar
Overloaded
Platinum
Posts: 43
Joined: 05 Feb 2012 02:37
Family Historian: None

Custom queries

Post by Overloaded » 07 Aug 2012 04:05

Sorry about the typo.

Now have this in the subtitle
=Individual(['Person'])

and the filters are unchanged:
Add if =FactOwner(%FACT%,1,MALES_FIRST) is ['Person']
Add if =FactOwner(%FACT%,2,MALES_FIRST) is ['Person']


which printed this in the report:
,1,MALES_FIRST

so, it appears to be attempting a function...

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

Custom queries

Post by tatewise » 07 Aug 2012 10:46

Don't know how you are getting that effect. If I use those settings I get two prompts for Person.

Which FH Version are you running?

As has been said before, the Row filters must be:

Code: Select all

Add if =IsSameItem(FactOwner(,1,MALES_FIRST),Individual(['Person'])) is true.
Add if =IsSameItem(FactOwner(,2,MALES_FIRST),Individual(['Person'])) is true.

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Custom queries

Post by PeterR » 07 Aug 2012 15:43

Image
The above is certainly working OK for me. The Expressions are pasted below so that you can copy and paste them into FH:

Code: Select all

=Individual(['Person'])
=TextIf(IsSameItem(FactOwner(,1,MALES_FIRST),Individual(['Person'])),'',FactOwner(,1,MALES_FIRST))
=IsSameItem(FactOwner(,1,MALES_FIRST),Individual(['Person']))
=IsSameItem(FactOwner(,2,MALES_FIRST),Individual(['Person']))
Edit: Even better column Expression:

Code: Select all

=TextIf(IsSameItem(FactOwner(,1,MALES_FIRST),Individual(['Person'])),FactOwner(,2,MALES_FIRST),FactOwner(,1,MALES_FIRST))

avatar
Overloaded
Platinum
Posts: 43
Joined: 05 Feb 2012 02:37
Family Historian: None

Custom queries

Post by Overloaded » 08 Aug 2012 05:27

Hallelujah!  It works, including the column filter for different name[smile]

Details:
I was running 5.0.0, so I upgraded.  That made my existing filters produce two prompts, both searching the list of individuals.

Copying PeterR's code was non-trivial.  For whatever reason, I can cut-and-paste the expressions he gave into other fields in FH, but not into the fields for the expressions.  Also, if you don't first remove the existing parameter field on the row filter, it just won't accept the new filter :)

Thank you both

User avatar
PeterR
Megastar
Posts: 1129
Joined: 10 Jul 2006 16:55
Family Historian: V7
Location: Northumberland, UK

Custom queries

Post by PeterR » 08 Aug 2012 11:54

Glad you've got the query to work properly at last.  For the Paste, were you trying to use Ctrl-V?  Had you tried the right-click context-menu Paste?

Post Reply