[Solved] Changing a field value
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
[Solved] Changing a field value
hi, i previously created a document with a field via insert > fields > other > variables tab, then:
type = set variable
format = general
name = doctitle
value = 'blah blah blah'
i did this about a week ago and now i want to change the value of this field. so i right click on the field in question, select fields, then alter the value to 'blee blee blee'. however when i click ok it will not update on the page. i have also tried ctrl+a then f9 to refresh the page but this does not work either. the funny thing is that when i hover the cursor over the field it does show the new value 'blee blee blee' but the field on the page still shows 'blah blah blah'. closing and re-opening the writer does not fix the problem either! my guess is that this must be a bug - but does anyone know any workarounds?
cheers
peter
type = set variable
format = general
name = doctitle
value = 'blah blah blah'
i did this about a week ago and now i want to change the value of this field. so i right click on the field in question, select fields, then alter the value to 'blee blee blee'. however when i click ok it will not update on the page. i have also tried ctrl+a then f9 to refresh the page but this does not work either. the funny thing is that when i hover the cursor over the field it does show the new value 'blee blee blee' but the field on the page still shows 'blah blah blah'. closing and re-opening the writer does not fix the problem either! my guess is that this must be a bug - but does anyone know any workarounds?
cheers
peter
Last edited by petermiller1986 on Thu May 26, 2011 11:11 am, edited 1 time in total.
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid
- Hagar Delest
- Moderator
- Posts: 33687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Changing a field value
Hi and welcome to the forum!
Have you selected the entry "Text" in the Format pane of the insert>Field options? personally, I prefer the User Field that let you create a variable first, without inserting it. Then you can insert your first input field and afterward the Show variable entries.
Note that the User fields are updated in the whole document whereas the Set variable are not updated in the places before a changed value.
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
Have you selected the entry "Text" in the Format pane of the insert>Field options? personally, I prefer the User Field that let you create a variable first, without inserting it. Then you can insert your first input field and afterward the Show variable entries.
Note that the User fields are updated in the whole document whereas the Set variable are not updated in the places before a changed value.
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Re: Changing a field value
What document format are you saving to?
Saving to any format other than OOo's native ODF format (.odt for text) carries some risk of losing formatting or other problems. If you're not saving as ODF, try that and see if you still have a problem.
You might also try View > Field Names: YES to see if there are some extra fields that might be causing a problem.
Otherwise, your description looks reasonable--it should be working.
If none of that helps, please attach a sample document that we can try. You can use the "Upload Attachment" link (below the message entry area after you click "POST REPLY"). [Forum] How to attach a document here
Saving to any format other than OOo's native ODF format (.odt for text) carries some risk of losing formatting or other problems. If you're not saving as ODF, try that and see if you still have a problem.
You might also try View > Field Names: YES to see if there are some extra fields that might be causing a problem.
Otherwise, your description looks reasonable--it should be working.
If none of that helps, please attach a sample document that we can try. You can use the "Upload Attachment" link (below the message entry area after you click "POST REPLY"). [Forum] How to attach a document here
AOO4/LO5 • Linux • Fedora 23
- Hagar Delest
- Moderator
- Posts: 33687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Changing a field value
Except if the format of the Set variable is set to Standard (at least on my OOo 3.3.0 on W2k).acknak wrote:Otherwise, your description looks reasonable--it should be working.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Re: Changing a field value
Ouch. You're right, that's the problem. Sorry!
I was sure that the default "General" format worked with text or numbers, but maybe I'm confused with Calc.
It seems that, in Writer, the "General" format only works for numbers, and once you insert the field, changing the format to text has some problem(s); you have to delete the field and re-insert it with the format set to text. If you insert the "Set variable" field with a text format, then it should display the text.
Thanks for the correction, Hagar!
I was sure that the default "General" format worked with text or numbers, but maybe I'm confused with Calc.
It seems that, in Writer, the "General" format only works for numbers, and once you insert the field, changing the format to text has some problem(s); you have to delete the field and re-insert it with the format set to text. If you insert the "Set variable" field with a text format, then it should display the text.
Thanks for the correction, Hagar!
AOO4/LO5 • Linux • Fedora 23
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
Re: Changing a field value
thanks for the welcome
and thanks for the support.
ok ... i am saving the document as .odt (is that the one i should use? - its not a template, its just a regular document)
i tried deleting the 'doctitle' variable then creating the 'doctitle' variable again with format=text but when i went insert only a blank field showed up on the page.
so i tried first deleting the 'doctitle' variable (by clicking the X in the [insert > fields > other] popup - is this the right way?) then creating a new variable called 'docname' with the following properties:
type = set variable
format = text
name = docname
value = 'blee blee blee'
and this one worked - it showed on the page correctly.
then i created a new variable callted 'doctitle' again but with the following properties:
type = set variable
format = text
name = doctitle
value = 'blee blee blee'
and this time it worked - it shows up on the page properly. so my guess is that deleting the original variable in the writer didnt take effect until another variable was created. im not sure if i should put a [solved] up yet - it is solved for me now, but im not really sure why and whether it will be solvable in the same way next time...
what do you guys reckon? if anyone can duplicate my problem i would be interested to know
ok ... i am saving the document as .odt (is that the one i should use? - its not a template, its just a regular document)
i tried deleting the 'doctitle' variable then creating the 'doctitle' variable again with format=text but when i went insert only a blank field showed up on the page.
so i tried first deleting the 'doctitle' variable (by clicking the X in the [insert > fields > other] popup - is this the right way?) then creating a new variable called 'docname' with the following properties:
type = set variable
format = text
name = docname
value = 'blee blee blee'
and this one worked - it showed on the page correctly.
then i created a new variable callted 'doctitle' again but with the following properties:
type = set variable
format = text
name = doctitle
value = 'blee blee blee'
and this time it worked - it shows up on the page properly. so my guess is that deleting the original variable in the writer didnt take effect until another variable was created. im not sure if i should put a [solved] up yet - it is solved for me now, but im not really sure why and whether it will be solvable in the same way next time...
what do you guys reckon? if anyone can duplicate my problem i would be interested to know
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid
- Hagar Delest
- Moderator
- Posts: 33687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Changing a field value
I don't follow you. Had you inserted some text in the Value field of the first variable (format set to Text)?petermiller1986 wrote:my guess is that deleting the original variable in the writer didnt take effect until another variable was created.
Remember that a Set variable doesn't update occurrences placed before in the text, only the following.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
Re: Changing a field value
what i mean is that even though the variable dissapeared from the list on the [insert > fields > other] popup when i clicked the X button, i think it was still stored in the background in openoffice. the reason i think this is because creating a variable with format=general, then deleting it, then creating a variable with the exact same name but with format=text did not work for me. when i did this it had no better results than attempting to change the format of the variable without ever deleting it - this also does not work for me.
what did work was to delete variable named A format=general, create variable named B, then create variable named A again but format=text. this seemed to work in my case.
but as i say i would like to see if others have this problem.
cheers
peter
what did work was to delete variable named A format=general, create variable named B, then create variable named A again but format=text. this seemed to work in my case.
but as i say i would like to see if others have this problem.
cheers
peter
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid
- Hagar Delest
- Moderator
- Posts: 33687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Changing a field value
Well, I made some tests and this is rather weird: if you set a variable (Standard), insert it and there is nothing displayed. If you set the same variable but clicking the Text format this time, it inserts correctly the new value... and it updates the first field with its first text value!
Don't know exactly what the Standard format is really for...
NB: For the Set reference, I can never use either the green validation mark or the red button to delete the reference.
Don't know exactly what the Standard format is really for...
NB: For the Set reference, I can never use either the green validation mark or the red button to delete the reference.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
Re: Changing a field value
when you say
with this:
do you mean set a variable with format=general?Hagar de l'Est wrote:set a variable (Standard)
with this:
i agree. the fields do not seem to work properly at all for me in writerHagar de l'Est wrote:NB: For the Set reference, I can never use either the green validation mark or the red button to delete the reference.
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid
- Hagar Delest
- Moderator
- Posts: 33687
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Changing a field value
I see Standard in the pane but it may be general for other localizations:
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
Re: Changing a field value
ah right. must be the same as the 'general' format i see:
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid
-
petermiller1986
- Posts: 10
- Joined: Mon May 23, 2011 10:38 am
Re: Changing a field value
i had a bit more of a play around (i really am writing a lot of documents at the moment!) and discovered a few more things...
the X button on the 'fields' popup will only appear if there is no used instance of the variable within the document. i think i read this somewhere too, but i can't remember now...
the 'general' format can be used for text, however once it is used it cannot be changed by right clicking on the field. it does appear that the variable can be changed via the [insert > fields > other...] popup though, but in order to do this, all instances of the variable must be deleted from the page. doing this will not change a field which is already in place, however if you delete the field then re-insert then it will be the new one. its not very convenient to do this though, so my suggestion is never to the use the 'general/standard' format...
i think this answers all my questions, so i will close off this thread. hopefully others find it useful in future
the X button on the 'fields' popup will only appear if there is no used instance of the variable within the document. i think i read this somewhere too, but i can't remember now...
the 'general' format can be used for text, however once it is used it cannot be changed by right clicking on the field. it does appear that the variable can be changed via the [insert > fields > other...] popup though, but in order to do this, all instances of the variable must be deleted from the page. doing this will not change a field which is already in place, however if you delete the field then re-insert then it will be the new one. its not very convenient to do this though, so my suggestion is never to the use the 'general/standard' format...
i think this answers all my questions, so i will close off this thread. hopefully others find it useful in future
open office 3.2.0
ubuntu 10.04.1 lts lucid
ubuntu 10.04.1 lts lucid