Page 1 of 1
Custom Query -- Source Title
Posted: 24 Jan 2011 15:07
by hsw
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
Custom Query -- Source Title
Posted: 24 Jan 2011 15:21
by tatewise
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%.
Custom Query -- Source Title
Posted: 24 Jan 2011 15:31
by hsw
Thank you! Queries are my Achilles heel...
Custom Query -- Source Title
Posted: 20 Aug 2011 14:39
by delwoodman
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
Custom Query -- Source Title
Posted: 20 Aug 2011 14:51
by delwoodman
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
Custom Query -- Source Title
Posted: 20 Aug 2011 18:09
by Jane
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%)
Custom Query -- Source Title
Posted: 20 Aug 2011 21:08
by delwoodman
Jane:
Many thanks.
Derek