[Solved] Reference input field?

Discuss the word processor
Post Reply
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

[Solved] Reference input field?

Post by Villeroy »

Input fields as described here: https://wiki.openoffice.org/wiki/Docume ... put_fields
I want the entered text to appear in several places of my document.

I see that there are only negative answers on this forum.
Last edited by Villeroy on Thu May 17, 2018 10:43 am, edited 1 time in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: Reference input field?

Post by jrkrideau »

I had the feeling that I got it to work about 8 or 10 years ago but I cannot seem to get it to work today. I wonder if the wiki is out of date or do we have a bug?

I cannot seem to get a function to appear in the Insert List.
 Edit: Have a look at the User Field. It may do something useful. 
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Reference input field?

Post by RoryOF »

There is an article at
https://www.techrepublic.com/blog/linux ... penoffice/
and a linked (complex?) example from that page at
http://b2b.cbsimg.net/downloads/Frye/Ap ... ackage.zip
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Reference input field?

Post by MrProgrammer »

I began with the Dummy Text, dt → F3. Replacing the first word, "He", I created a user field, Insert → Fields → Other → Variables → Type=User field → Name=SC → Value=He → Format=Text → Insert → Close. I selected the field, Edit → copy. I selected the other occurances of "He" and used Edit → Paste. At the beginning of the document, I typed "Subject capitalized: " then Insert → Fields → Other → Variables → Type=Input field → Name=SC → Reference=SC → Insert → OK.

I repeated this process creating/pasting three additonal fields S, O, and P for "he" (lower case), "him", and "his". Now if I double click the four input fields at the beginning and change them to "She", "she", "her", and "her", the gender of the paragraph is changed. Is this what you want to do?

The field names were chosen as SC = Subject Capitalized, S = Subject, O = Object, P = Possessive.
 Edit: Clarified that one must use the Variables section of the Insert → Fields dialog. 
Attachments
201805162244.odt
(12.3 KiB) Downloaded 92 times
Last edited by MrProgrammer on Thu May 17, 2018 3:19 pm, edited 1 time in total.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Reference input field?

Post by Villeroy »

RoryOF wrote:There is an article at
https://www.techrepublic.com/blog/linux ... penoffice/
and a linked (complex?) example from that page at
http://b2b.cbsimg.net/downloads/Frye/Ap ... ackage.zip
Thank you. That worked. There is an iInput field on the "Functions" tab and one on the "Variables" tab. Only the second one can be used as a variable as MrProgrammer demonstrates so nicely.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Solved] Reference input field?

Post by jrkrideau »

So, at the moment, the "Functions" option seem unusable?

It is also possible to do a "replace all" by redefining the entry in the User Field.
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Reference input field?

Post by Villeroy »

jrkrideau wrote:So, at the moment, the "Functions" option seem unusable?
It works as a single instance. If you want to enter something once and reuse it anywhere, you have to use the variable input field. IMHO, the single-instance text field would be obsolete if it can not provide any additional functionality. So far I can't see any reason why one should use the single-instance instead of the variable. That doesn't mean much since my mind becomes dizzy when I spend too much time with Writer.
It is also possible to do a "replace all" by redefining the entry in the User Field.
I can edit any single instance of the variable field for all instances by a double-click.
I can also use Ctrl+Shift+F9 to trigger the little input dialog to query all input fields of both types.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Solved] Reference input field?

Post by jrkrideau »

So far I can't see any reason why one should use the single-instance instead of the variable.
Exactly.
my mind becomes dizzy when I spend too much time with Writer.
Indeed, but you would be raving and screaming if you had to use Word, speaking from experience.

It may be time to move to an alternative, but highly reliable word processing approach : Wordprocessing
LibreOffice 7.3.7. 2; Ubuntu 22.04
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Reference input field?

Post by Villeroy »

jrkrideau wrote: It may be time to move to an alternative, but highly reliable word processing approach : Wordprocessing
Where is the backspace key on that device?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34612
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Reference input field?

Post by RoryOF »

It's known as "striking out" or "obliteration". Its spellcheck is often very uncertain, but the layout can be extremely flexible.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: [Solved] Reference input field?

Post by MrProgrammer »

jrkrideau wrote:It may be time to move to an alternative, but highly reliable word processing approach : Wordprocessing
Export to PDF is still under development, but Cut/Paste and Copy/Paste are available. I find it better than File → New → Formula in many situations.
Last edited by MrProgrammer on Thu May 17, 2018 5:40 pm, edited 1 time in total.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: [Solved] Reference input field?

Post by jrkrideau »

Villeroy wrote:
jrkrideau wrote: It may be time to move to an alternative, but highly reliable word processing approach : Wordprocessing
Where is the backspace key on that device?
Combined with suitable recording media, parchment and vellum are recommended for long term storage, a pumice stone is highly recommended.
LibreOffice 7.3.7. 2; Ubuntu 22.04
Post Reply