DisplayName does not match DisplayExpression due to punctuation

(Patrick Allo) #1

I’m aware that $DisplayName is the result of evaluating $DisplayExpression, but it also appears that when $DisplayExpression contains punctuation-marks (period, comma, colon, …) only part of the DisplayExpression shows up as the DisplayName.

Concretely: The DisplayExpression is based on $ArticleTitle + " (" + $Authors + ")", but when $ArticleTitle contains punctuation-marks, it only a part of $ArticleTitle that makes it into $DisplayName.

For instance, when ArticleTitle is “foo: bar, baz” and Authors is “Peter”, the DisplayExpression is “foo: bar, baz (Peter)” but the DisplayName is just “bar”.

It is as if the contents of $ArticleTitle isn’t treated as a string, but as a set or list and only part of it is displayed.

Is there any way to override this behaviour? (escape the punctuation, or otherwise protect the contents of $ArticleTitle to avoid it being evaluated)

(Paul Walters) #2

I cannot manage to reproduce this issue.

Perhaps something else is going on with your document?

DE Posting.tbx (52.2 KB)

(Patrick Allo) #3

I’ve been able to fix the issue.

At some stage an action (which I had removed) had overridden the DisplayExpression that was inherited from the prototype, and replaced it with the intended evaluation of the DisplayExpression rather than with $ArticleTitle + " (" + $Authors + “)” itself. For some reason DisplayName was then a further evaluation.

Resetting the inherited values fixed the problem.