When a variable (type "user field" or type "variable") has the same name but is inserted with different formats (Text vs. General), there is an interaction between them, in terms of what is displayed, which seems wrong. (could not find any relevant documentation) Case 1 (user field) 1. Insert variable type "user field" with "General" format, and a text string value. Actual: 0 is shown. 2. Insert another "user field", with same variable name, "Text" format, and a text string value. Actual: The text value is also shown in the first user field as well. (i.e., the "General" format is, in effect, overridden). Case 2 (variable) 1. Use "set variable" to insert a variable field with "General" format, and a text string value. Actual: Nothing is shown. 2. Insert another "variable" field, with same variable name as the first, but "Text" format, and a text string value. Actual: The text value that was entered for the first variable is now shown, even though the format is "General". In short, these two cases show how the same variable name with different formats result in "General" format fields being able to show text. Is that to be expected?
Case 1: 1. looks wrong to me, but might be intentional (in sense of Word compatible behaviour). Having seen the code lately I'm tending more to assume a bug here though.. 2. if you hit the check mark button that's expected; not sure what should happen if you didn't. There is no "other user field with same name", user fields are document global. But the state looks messy. Case 2: 1. similar to case 1. 2. similar to case 2, but there should be two instances of the variable; apparently setting a new triggers redisplaying the first. Things are a little more obvious if text1 and text2 (i.e. different texts) are used for each step. Behaviour is the same already in OOo.
> Case 2: > 2. similar to case 2, to case 1 of course..
See bug 146737, comment 8 for an additional point that saving and reloading the document with the variables that have the same name, but different formats, results in changing the format to the last inserted instance.