I'm pulling out my hair here.
I have no problem diisplaying 'Where within Source' in a query.
But, apparently, I'm not using the correct reference in the plugin I'm writing.
My function gets a pointer to a fact - pfact, and loops through the citations (sources?) for the fact.
I'm having trouble accessing both 'Where within Source' and the citation 'Note'.
I've tried a number of alternatives; the current one is:
sPage = fhGetItemText(pfact, '~SOUR[1].PAGE') -- is always blank
sNote = fhGetItemText(pfact, '~SOUR[1].NOTE2') -- this gets the note for the Source record
Thanks for your help,
Shosh
* Citations - can't figure out how to get 'Where within Source'
- tatewise
- Megastar
- Posts: 28333
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Citations - can't figure out how to get 'Where within Source'
You have a missing dot after the tilda ~ in the relative data reference:
'~.SOUR[1].PAGE'
Perhaps you are thinking of the format for shortcuts.
( I don't understand why '~SOUR[1].NOTE2' works at all. )
See how_to:understanding_data_references#relative_data_references|> Understanding Data References > Relative Data References.
Also see the examples in the Tools > Plugins > How to Write Plugins help for fhGetItemText(...) and the very similar fhGetDisplayText(...) both of which use relative data references.
'~.SOUR[1].PAGE'
Perhaps you are thinking of the format for shortcuts.
( I don't understand why '~SOUR[1].NOTE2' works at all. )
See how_to:understanding_data_references#relative_data_references|> Understanding Data References > Relative Data References.
Also see the examples in the Tools > Plugins > How to Write Plugins help for fhGetItemText(...) and the very similar fhGetDisplayText(...) both of which use relative data references.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
-
- Superstar
- Posts: 280
- Joined: 13 May 2015 16:28
- Family Historian: V7
- Location: Mitzpe Jericho, Israel
Re: Citations - can't figure out how to get 'Where within Source'
Thank you so much. Problem solved!
Shosh Kalson