* Custom Query -- Source Title
-
hsw
Custom Query -- Source Title
Is it possible to create a column in a Custom Query that contains the Source Title if it exists, but otherwise it contains the Source Short Title?
ID:4962
ID:4962
- tatewise
- Megastar
- Posts: 27088
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Custom Query -- Source Title
The Column Expression that should work is:
=TextIf(IsEmpty(%SOUR.TITL%),%SOUR.ABBR%,%SOUR.TITL%)
i.e. If the Full Title is Empty, then use Short Title, else use Full Title.
The above is the Expression for a Query Type: Source.
For other Query Types replace %SOUR.TITL% and %SOUR.ABBR% as appropriate.
For Individual use %INDI.****[1].SOUR[1]>TITL% / >ABBR%.
=TextIf(IsEmpty(%SOUR.TITL%),%SOUR.ABBR%,%SOUR.TITL%)
i.e. If the Full Title is Empty, then use Short Title, else use Full Title.
The above is the Expression for a Query Type: Source.
For other Query Types replace %SOUR.TITL% and %SOUR.ABBR% as appropriate.
For Individual use %INDI.****[1].SOUR[1]>TITL% / >ABBR%.
-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Custom Query -- Source Title
Tatewise:
I have been trying to adapt the =TextIf expression you posted, for use in a fact query.
I have a column expression
%FACT.SOUR[1]>TITL%
which works fine but wanted to show preferentially the short title where the relavant source has one.
I tried using:
=TextIf(IsEmpty(%FACT.SOUR.TITL%),%FACT.SOUR.ABBR%,%FACT.SOUR.TITL%)
but this give me an error message. Do you have any suggestions?
I suspect the problem lies with my inexpertise with fact queries.
I am using v. 4.1.3
Regards,
Derek
I have been trying to adapt the =TextIf expression you posted, for use in a fact query.
I have a column expression
%FACT.SOUR[1]>TITL%
which works fine but wanted to show preferentially the short title where the relavant source has one.
I tried using:
=TextIf(IsEmpty(%FACT.SOUR.TITL%),%FACT.SOUR.ABBR%,%FACT.SOUR.TITL%)
but this give me an error message. Do you have any suggestions?
I suspect the problem lies with my inexpertise with fact queries.
I am using v. 4.1.3
Regards,
Derek
-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Custom Query -- Source Title
Apologies. I mispasted my expression.
The expression I have been trying and failing to get to work is:
=TextIf(IsEmpty(%FACT.SOUR.ABBR%),%FACT.SOUR.TITL%,%FACT.SOUR.ABBR%)
Derek
The expression I have been trying and failing to get to work is:
=TextIf(IsEmpty(%FACT.SOUR.ABBR%),%FACT.SOUR.TITL%,%FACT.SOUR.ABBR%)
Derek
- Jane
- Site Admin
- Posts: 8442
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Custom Query -- Source Title
If you look at the original
%FACT.SOUR[1]>TITL%
Note the > between the SOUR[1] and TITL this tells FH to move to the Source record, when you created the expression you used .
Try
=TextIf(IsEmpty(%FACT.SOUR>TITL%),%FACT.SOUR>ABBR%,%FACT.SOUR>TITL%)
%FACT.SOUR[1]>TITL%
Note the > between the SOUR[1] and TITL this tells FH to move to the Source record, when you created the expression you used .
Try
=TextIf(IsEmpty(%FACT.SOUR>TITL%),%FACT.SOUR>ABBR%,%FACT.SOUR>TITL%)
-
delwoodman
- Famous
- Posts: 125
- Joined: 15 Sep 2007 10:42
- Family Historian: V6.2
- Location: Brighton, East Sussex, UK
Custom Query -- Source Title
Jane:
Many thanks.
Derek
Many thanks.
Derek