Insert
>Field
>More Fields
allows to define variables and set their value.
Built-in help suggests they can have a text value (format code @
). It explicitly states that strings in conditions must be bounded by double quotation marks (such as x == "ABC"
in page Defining Conditions) which means variables can have non-numeric value.
However, when a non-numeric value is given to a variable, it displays as 0 (zero), even if format code is @
. I also tried to enclose the value between double quotation marks to no avail.
Is there an unwritten restriction that Writer variables are exclusively numeric-valued?
Note: an imperfect workaround is to define a custom property with File
>Properties
. This workaround is imperfect because the property value is constant across the document and cannot be changed to have a different insertion (which is my primary goal). Another workaround is conditional text but it requires using complicated hidden text/paragraph instead of a mere variable in the case of a simple word insertion through this variable.
LO 6.4.5.2, Fedora Linux 32