I’ve noticed that TB doesn’t colorcode user attributes with Cyrillic names in formulas (see the attached image). Which means that you can’t use them as attributes in, for instance, DisplayExpression action.
I’ve not tested yet Cyrillic attributes in other actions or queries. Perhaps the problem occurs in that cases as well.
Color coding is a convenience, not a computational feature. It appears you have run into the same problem as this recent user reported:
@Maximus you need to do what that user needed to do: enclosure the righthand side of your action code in straight quotes:
$DisplayExpression = "$Name + $Тест +$Test"
It’s all explained in the thread cited above.
Thank you very much, @PaulWalters !
I was confused at first with combination of straight quotes " and apostrophes ’ in formula. But after your explanation all becomes clear.
I would also add that if you want to add some text or spaces between attribute values, you should enclose it in apostrophes:
$DisplayExpression = " ' ' + $Name + ' ' + $Тест + ' ' + $Test";
This is an unintended side-effect of a convenience.
Ideally, strings — including expressions — should be enclosed in quotes. But sometimes people forget the quotes, and most of the time it does no harm:
$Color=red;
The color “red” really ought to be a quoted string, but (as mehitabel would say) wothehell. (Anyone here know mehitabel?)
But here, bad things can happen without quotes. It’s possible I can find a way to code around it for cyrillic, if not for all languages. But quotes are a lot better.
Thank you!
In the meantime, I continue testing and get confused once again.
I’ve added 3 user attributes in Cyrillic (all of them are strings), set values and try to apply 3 stamps. But the attribute values are not displayed in $DisplayExpression.
And an error occures:
I’ll attach my test file here.
Тест.tbx (179.0 KB)
The display expression of тест Это тест It's a test
is
' ' + $Name + ' ' + $Тест + ' ' + $Test```
This means:
- Take nothing.
- Add the literal value of whatever $Name is
- Add nothing to that
- Add the value of $Тест right now
- Add nothing
- Add the value of $Test right now
I think what you want is probably something like:
$DisplayExpression = "$Name+$Тест";
This means:
- The display expression should be
"$Name+$Тест;"
- When it’s time to display the name of this note, take its $Name, and then appoint $Тест.
Yes, I‘ve no idea why errors occur.
I’ll take a look; I didn’t see the syntax error on the first look.
For those wondering about (archie and) mehitabel: see here.
I’ve confirmed the issue, written a test for it, and expect to resolve it shortly.
(later)
OK. The parser in 10.0.1 has trouble in some contexts with the letter ф. This will be fixed in the next backstage release.
Thank you, Mark!
I assume the issue not only in letter ф. but also in other Cyrillic letters in combination with the dot. (in my file attached above “оп.” and “Д.” also caused errors).
Yes. I believe we’ve solved this one, though other Cyrillic issues might emerge.