Nested function sentence template
Posted: 14 Feb 2021 14:15
I am trying to devise a template function which will return "the Bronx" whenever the word "Bronx" appears within a fact place. If the word doesn't appear, the template should return the Bronxless place. This is as close as I've been able to come:
{=TextIf (%FACT.PLAC% = (ContainsText(%FACT.PLAC%, "Bronx", STD)), "the Bronx", %FACT.PLAC%)}
Unfortunately it always returns FACT.PLAC (that is, the data). What am I doing wrong? As I understood the help files, the TextIf function returns the second variable if the first Boolean parameter returns "true" and the third if the Boolean is false.
If I can get this going it will save four or five hundred individual fact edits. Any suggestions warmly welcomed.
Robert
{=TextIf (%FACT.PLAC% = (ContainsText(%FACT.PLAC%, "Bronx", STD)), "the Bronx", %FACT.PLAC%)}
Unfortunately it always returns FACT.PLAC (that is, the data). What am I doing wrong? As I understood the help files, the TextIf function returns the second variable if the first Boolean parameter returns "true" and the third if the Boolean is false.
If I can get this going it will save four or five hundred individual fact edits. Any suggestions warmly welcomed.
Robert