Page 1 of 1

Data References In Fact Sentences

Posted: 21 Feb 2023 16:01
by McHooty
Hi

I hope someone can give me the answer to this before I completely lose it !

I have a Custom Fact (Newspaper) and a Custom Source Template (Newspaper Entry) which is based on the Essentials/Publications/ Newspaper Item Template. I want to add the data from two fields in my Custom Source Template (Newspaper and Type, which are both Enum and populated) to the Newspaper Fact Sentence.
Despite searching and trying different ways I feel like I have hit a brick wall, but the answer will probably be glaringly obvious. I just need to see it.

Re: Data References In Fact Sentences

Posted: 21 Feb 2023 17:15
by tatewise
Michael, it would help us if you posted what you had tried because you may be very close.

There are special shortcut data references for Source Templated Metafields that rely on their type and name.
See FH Help page Understanding Data References near the end under Data References And Metafields.
e.g. %SOUR.~EN-NEWSPAPER% for your Enumeration Newspaper metafield.

So from the Sentence Template I think you need {%FACT.SOUR[1]>~EN-NEWSPAPER%} but that assumes it is the 1st Source Citation against the fact.

Re: Data References In Fact Sentences

Posted: 21 Feb 2023 21:21
by McHooty
Hi Mike

Thanks for your help and the solution.
I had gone down the Data Reference Assistant route, using Source/Field and renaming _FIELD with NEWSPAPER, but hadn't picked up on the ~EN- prefix. Whether I would have eventually got there with another re-reading of the Understanding Data References help page is a moot point.

Nevertheless a good learning experience.

Many Thanks