OOo Off the Wall: Fielding Questions, Part 3

How to use fields for editing and content management.

The Functions tab of the Fields window (Insert > Fields > Other > Functions) contains tools for working with content. Some of the fields on the tab are useful for writing drafts and editing. Others are useful for maintaining different versions of a document in a single file. To maintain multiple versions, you can choose from several fields, each with a different strategy--varying content according to condition, selecting from a list or hiding and revealing content as needed.

Many of the fields on the Functions tab can take time to set up. For a document that is printed once, they probably are not worth bothering about. It is when you are building templates that many of these fields come into their own. With a bit of planning, you can have your templates serve multiple purposes, making them even more useful than they already are.

Understanding Conditions

Several of these strategies for controlling content by way of fields require the setting up of a condition. This requirement confuses many users without a background in mathematics. The concept isn't well-documented in the OOo on-line help, and some users may confuse it with Conditional Styles, an altogether different concept.

The concept of a condition, however, is less complicated than many users fear. All that a condition does is set when or whether a piece of content defined in a field appears in a document.

In versions of released prior to the 2.0 beta, a condition could be almost any mathematical or logical expression. A condition also could be set with the user data entered. For example, the condition user_initial="BB" used with a hidden paragraph would prevent anyone with any other initials from seeing let alone printing the paragraph. However, although such conditions provided another level of security, they were needlessly complex, and few people probably used them.

As of the 2.0 beta version, conditions have been simplified. The only settings apparently valid for conditions are 0 or False and 1 or True. By opening the Fields window and changing the condition, you can choose whether content defined as part of the field appears in the document. This concept should become clearer as we discuss the different types of fields.

Using Placeholder Fields

Placeholders are fields that mark where missing content should go. Placeholders are a simple tool, but they are useful in a number of situations:

  • When you are writing, starting with the first paragraph and writing each paragraph in order often is the hardest way to write. You may know the points you want to write but not how to introduce them.

  • Often, you are more prepared to write one part of a document than another.

  • You may be missing information needed for one part of a document.

  • Somebody else may be writing part of a document.

In these or similar circumstances, a placeholder can mark the missing the contents, freeing you to write the parts you know and return to the missing parts later.

To add a placeholder, click Insert > Fields > Other > Functions > Type > Placeholder. From the Format field, choose the type of content that eventually will replace the placeholder--Text, Table, Frame, Graphics or Object. You also may want to add temporary text in the Placeholder field and mouseover text in the Reference field. For example, if you were working with a group of writers, you might use the mouseover text to identify who should add the content.

When you are ready to add content, click the placeholder. If you specified Text as the format, what you type replaces the placeholder. If you specified any other format, the dialog box for importing that type of content appears.

Using Input Fields

An input field is an editing tool one step up from a placeholder. With an input field, you have content already but want to mark it for possible editing.

To add an input field, click Insert > Fields > Other > Functions > Type > Input field. Although the Reference field is available for a mouseover, you can ignore it because it has no effect. Instead, click the Insert button directly. When the Input window opens, type the text for the input field into the large text box, not the Edit field.

To change the input field, click the field and change the text in the large text box.


-- Bruce Byfield (nanday)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Conditional text

dominic's picture

Wouldn't it be very useful to be able to refer to a "bookmark reference" in the condition statement?

I have bookmarked some data in the cell of a table which is DDE linked to a database. I would like to test the value of the bookmarked data in a conditional text field.

I guess the workaround is to use OpenOffice Basic; any ideas?


David Kwok's picture

It would be nice if some examples are given in the articles. I have spent time to research on how to set up the condition. It is not a lot of examples out there. It may be that it is just not clear how to do it. An example for not showing a field is Not(Name) where Name is a field in the document. If the field is empty it will not show as a blank.

There must be other examples of setting conditions but I don't know how.

Could some one come up more examples?

David Kwok

True or False

Anonymous's picture

Yes, some more examples would be nice. I really can't see the point of conditional text if the only thing you can enter is True or False.
I must be getting this wrong.

Conditional Text

jperser's picture

For some reason it seems that the conditional text was dumbed down in the 2.0 beta. Maybe it's just me though.

OOo Off the Wall Listing Page

Anonymous Bosch's picture

I really appreciate these 'OOo Off the Wall' articles. The only thing that would make them a more useful resource would be a 'home page' for the series with a hyperlinked list to each of the pieces.

Many thanks.