Page 1 of 1

Function problem in sentences

Posted: 07 Feb 2022 18:11
by Robert Jacobs
I must be doing something so spectacularly obvious that I don't see it. I'm trying out some functions in sentence templates and I can't get them to work:

{individual} was remembered as the {=Parentage(%INDI%)}

returns only "He was remembered as the."

This is an example; I know there are other ways to get the result, but why does the function fail?

Re: Function problem in sentences

Posted: 07 Feb 2022 18:23
by tatewise
Sentence Templates operate in the context of the current %FACT% and so %INDI% has no meaning.
You need to use the Contextual Data Reference %CUR_PRIN%.
See the FHUG Knowledge Base Understanding Data References and the FH Help page Understanding Data References under Contextual Data References.

Re: Function problem in sentences

Posted: 07 Feb 2022 18:25
by Robert Jacobs
Thanks, Mike. RTFM all over again . . . :)