Description: change method of creating of variable in Writer's dialogue "Fields". Today you must follow steps: 1. Open dialogue Fields (Ctrl+F2) 2. Go to tab Variables 3. Select type - Set variable 4. Enter Name of variable and enter Value of variable 5. Push button Insert (it insert new field in your document, that you don't need) 6. Repeat step 3-5 7. Delete all new fields with new variable from document! (I know, that there is checkbox "Invisible") I offer change method of creating a new variable (see mockup from attach) 1. Delete text box "Value" 2. Assign a default value to the variable or/and make entering value of variable optional 3. For create a new variable don't need to insert new field in the document. Need just select existing green checkbox "Apply". It create a new variable and clean text box Name for create next variable. Actual Results: too much steps for create a new variable in dialogue "Fields". It insert new fields in the document, then user should delete them Expected Results: simple process of creating a new variable in dialogue "Fields" Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Created attachment 135629 [details] mockup change method of creating a new variable
I also think, that it is not necessary to insert a new field in the document, if you create a new variable => set to NEW
Well, I do believe that it's no value in creating variables without relevant fields. Because without a value-setting field, the variable is simply useless (at least), needlessly takes a bit of memory, and might confuse one later when one supposes that the variable has some meaningful value.
(In reply to Mike Kaganski from comment #3) > Well, I do believe that it's no value in creating variables without relevant > fields. Because without a value-setting field, the variable is simply > useless (at least), needlessly takes a bit of memory, and might confuse one > later when one supposes that the variable has some meaningful value. Ok, but i want after creating of variable insert in to document Input field. I must delete variable field and insert instead it in to document Input field I can offer else one method: 1. Do not delete text field "Value", but make this optional field. If option is not active - variable == default, if option is active - user types value of variable. By default this option not active. 2. In addition to button Insert, make it possible to create a variable without insert field in document with using green checkbox.
@kompilainenn: I don't understand why you changed the version back to master. The earliest affected version is requested.
(In reply to Dieter Praas from comment #5) > @kompilainenn: I don't understand why you changed the version back to > master. The earliest affected version is requested. because this is enhancement
*** Bug 92662 has been marked as a duplicate of this bug. ***
- modified summary to highlight intention If the idea is to make it easier for 'input field', then perhaps it could/should be achieved directly with an enhancement to the 'input field' dialog (e.g., so the variable can be created as part of that dialog).
(In reply to Roman Kuznetsov from comment #6) > because this is enhancement If you are using the variable globally, then what is wrong with using the Type "User Field" (in Variables tab of Field dialog)? This already does everything that you have described in step 3 (of the proposed procedure) in comment 0.
(In reply to sdc.blanco from comment #9) > what is wrong with using the Type "User Field" (in Variables tab of Field > dialog)? This already does everything that you have described in step 3 > (of the proposed procedure) in comment 0. It doesn't. The green checkbox is clickable, true; but it does not add a new variable without inserting the field. At least it seems so in my testing with Version: 6.5.0.0.alpha0+ (x64) Build ID: adf7031e3a35fe9d43085e8b223a6e36d20a32f4 CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; Locale: ru-RU (ru_RU); UI-Language: en-US Calc: CL
Created attachment 156941 [details] Inserting a User Field, without inserting a field into the document (In reply to Mike Kaganski from comment #10) > It doesn't. The green checkbox is clickable, true; but it does not add a new > variable without inserting the field. Just to be sure I understand correctly. See attachment. This was done with 6.3.4.2 (but it can also be done with 6.5.0.0.alpha). I have circled the active Apply/Delete buttons to show that the MyVar "exists". (bottom right). And I have circled the "eof" at the top of document (with View Field Names checked) to show that no field was inserted. I did not use the "Insert" to create this variable, but I can go directly to "Input field" and use "MyVar" to make a functional input field. (but I cannot show this with Ctrl-F9 -- see bug #129760, comment 3 ) Did you use Insert? Can you get it to work as described in the previous paragraph, without Insert "User Field"?
(In reply to sdc.blanco from comment #11) Ah I see what I forgot: the checkbox is active even without the value, but then it does nothing (this would be nice to fix).
(In reply to Mike Kaganski from comment #12) > (In reply to sdc.blanco from comment #11) > > Ah I see what I forgot: the checkbox is active even without the value, but > then it does nothing The checkbox does more than "nothing". It actually creates a usable variable with the name in "Name" (with or without a value) > (this would be nice to fix). What is "broken" that needs to be "fixed"? The current behavior is exactly as requested in this enhancement (where the value will be set as part of the Input Field insert). It is also possible to "insert" User Fields with or with (or without) values (without first having to use the "apply" button). (in other words, all variations are possible, without extra clicks) "User Fields" do not show up in "Select" for type "Show Variable" -- maybe because they are global, so no real need to check the value at different locations. The only "limitation" with this "User Field" solution is if one wants to use different values of the variable in different parts of the document.
1. Ctrl+F2->Variables->User Field 2. Put "Foo" into Name box 3. Put "Bar" into Value box 4. Delete everything from Value box (!) 5. Try to push the checkmark.
(In reply to sdc.blanco from comment #13) > The only "limitation" with this "User Field" solution is if one wants to use > different values of the variable in different parts of the document. This is not "the only limitation", this is the whole difference. Variables are useful exactly because they may change in different parts. User field is another entity, with own applications. Any talk about User Fields here is off-topic (except to show example how variables should be modified).
(In reply to Mike Kaganski from comment #14) > 5. Try to push the checkmark. As long as I select a format (e.g., "Text" or "General"), I can add new variables without problem (e.g., writing values and deleting them, switching cursor focus to Name). And in the cases where Apply does not work, if I select a format, then I can add the variable with Apply). (tested with 6.3.4.2) But I understand that "User Fields" are not relevant here. So that was that.
Note that "Set variable" sets the variable to its value _at the position where it is inserted to the document_. Setting and inserting the same variable with a different value at another position sets the variable to that value _from that position_ on. I doubt that setting a variable without inserting it would make sense at all.
(In reply to Eike Rathke from comment #17) > Note that "Set variable" sets the variable to its value _at the position > where it is inserted to the document_. Setting and inserting the same > variable with a different value at another position sets the variable to > that value _from that position_ on. > > I doubt that setting a variable without inserting it would make sense at all. Why? Suppose I want a variable to have value '234' for a while, then to have value '123' - but without anything being visible on the document. Say, because I intend to use this value in other fields which do result in text appearing in the document. Is that not a reasonable request? Of course, there's the problem of how to indicate this has happened when the field results in no text.
(In reply to Eyal Rozenberg from comment #18) > Why? Suppose I want a variable to have value '234' for a while, then to have > value '123' - but without anything being visible on the document. Say, > because I intend to use this value in other fields which do result in text > appearing in the document. Is that not a reasonable request? You are mixing two things: inserting and being visible. You are free to insert with hidden flag; insertion creates a *point* at which the field changes its value, and Eike's phrase means that having a variable definition not bound to a point in document doesn't make sense (but actually it makes, to manage the *initial* value).