User:Lorinda/In-Progress

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:09, 14 July 2007 (edit)
Lorinda (Talk | contribs)
(Formatting Field Displays)
← Previous diff
Revision as of 00:25, 14 July 2007 (edit) (undo)
Lorinda (Talk | contribs)
(Concerning Date Fields - conditional fields)
Next diff →
Line 65: Line 65:
In the {{Window|Edit Fields}} window for Date fields, you will have a choice between Date (fixed) and Date. Date (fixed) will insert today's date, or a date with a specified offset from today. That date will remain fixed, regardless of when the document is opened. Date will insert a date that is updated each time the document is opened. In the {{Window|Edit Fields}} window for Date fields, you will have a choice between Date (fixed) and Date. Date (fixed) will insert today's date, or a date with a specified offset from today. That date will remain fixed, regardless of when the document is opened. Date will insert a date that is updated each time the document is opened.
<br> <br>
 +
 +==Conditional Fields==
 +
 +Conditional fields let you specify one of two values or text strings to use in a document, depending on the value of a related Variable. For example, a pastor might have a funeral liturgy with conditional fields inserted to supply the correct pronoun, depending on the gender of the deceased.
 +
 +===Setting the Variable===
 +The first thing you need to do is define and set the variable to be used in the condition.
 +*Under the {{menu|Insert}} menu, choose {{menu|Fields}} and then {{menu|Other}} (Or simply press {{Key|Command-F2}})
 +*Click on the {{section|Variables}} tab and choose {{prefName|Set Variable}}.
 +*Type a name for the variable in the {{prefName|Name}} box and a value in the {{prefName|Name}} box
 +*If you don't want the variable to be visible, you may check the {{prefName|Invisble}} box.
 +*Click {{Button|Insert}}
 +
 +===Creating an Input Field (Optional)===
 +If desired, you may insert an Input field tied to this variable, so that users are asked for the value of the variable when a new document is created based on this template.
==Related Links== ==Related Links==

Revision as of 00:25, 14 July 2007

Using Templates Without Data Sources

Sometimes you want to insert data such as name, address, etc. into a standard document without resorting to a data source. This article describes how to do so, using some of the many field types available in NeoOffice Writer.

Contents

Predefined Fields

NeoOffice includes several pre-defined fields that can be easily entered into any document. These include: date, time, page number, and page count. To insert these fields:

  • Click at the spot where you want the field inserted
  • Go to the Insert menu and choose Fields
  • Select the field type you want to insert

-->The field is inserted

Document Specific Fields

NeoOffice also includes some fields that make use of information from the Properties window. (You can set the document properties by going to the File menu and choosing Properties....)Three of these fields are available directly from the menu bar by choosing the Insert menu and then Fields, following the instructions above.

More fields related to document properties are available by doing the following:

  • Click at the spot where you want the field inserted
  • Go to the Insert menu and choose Fields
  • Choose Other...
-->The Fields window opens
  • Click on the Document or DocInformation tab near the top of the menu.
Which tab you need will depend on which field you want to insert.
  • Select the type of field you want from the Type columne
  • If necessary, choose the specific field from the Select column.
  • If needed, select the desired format from the Format column.

N.B. Not all the fields available in these two tabs are from the Document Properties window. Some of the fields in these two tabs are discussed elsewhere in this wiki. See Related Links below.

User Fields

You can also insert User-defined fields. To do so;

  • Under the Insert Menu, choose Fields and then Other...
  • Click on the Variables tab
  • Select User Field in the Type column
  • Choose the desired field format in the Format column
    • -->Note that Additional formats... opens a dialog box allowing you to choose other formats, include date formats.
  • Enter a Name for the field in the appropriate box
    • -->Note that there cannot by any spaces in the field name.
  • Click on the green check symbol to create (but not insert) the field
    • -->To delete a field, select it in the Selection and click on the red x.
  • To insert the field at the cursor point, click on the Insert
    • -->If you want the field contents to be hidden in the document, check the Invisible box before clicking Insert.
  • Create as many fields as needed, then click Close


Input Fields

Input fields are special fields tied to another field type. When a new document is created from a template, the user will be asked to fill in the values for all the input fields. To use Input Fields:

Note that Input Fields can also relate to Set Variables
  • While the Fields is still open, select InputField in the Type column.
  • Choose the User Field (or Variable) to which the Input Field is to be linked
  • Enter a description in the Reference box This is the prompt that will be shown when a user is asked to provide the value for this field.
  • Make sure the cursor is where you want the input field to appear (usually the first place the User Field or Variable in question needs to occur in the document0
  • Click on OK
  • Thereafter in the document, insert a "plain" User Field or Variable for that field. Whenever the Insert Field is updated, the related User Fields (or Variables) will be updated, too.


N.B. Due to an OpenOffice.org bug, Input Fields relating to User Fields defined as dates will not retain the correct date or formatting. It will also corrupt any related User Fields inserted in the document. Therefore do not use Input Fields with User Fields defined as dates. (User Fields defined as dates work correctly as long as you do not insert a related Input Field in the document).

Formatting Fields

To format the way a field appears in your document, right-click or control-click on the field and choose Fields... from the contextual menu. A dialog box will appear, allowing you to modify the appearance of the field.

Concerning Date Fields

In the Edit Fields window for Date fields, you will have a choice between Date (fixed) and Date. Date (fixed) will insert today's date, or a date with a specified offset from today. That date will remain fixed, regardless of when the document is opened. Date will insert a date that is updated each time the document is opened.

Conditional Fields

Conditional fields let you specify one of two values or text strings to use in a document, depending on the value of a related Variable. For example, a pastor might have a funeral liturgy with conditional fields inserted to supply the correct pronoun, depending on the gender of the deceased.

Setting the Variable

The first thing you need to do is define and set the variable to be used in the condition.

  • Under the Insert menu, choose Fields and then Other (Or simply press Command-F2)
  • Click on the Variables tab and choose Set Variable.
  • Type a name for the variable in the Name box and a value in the Name box
  • If you don't want the variable to be visible, you may check the Invisble box.
  • Click Insert

Creating an Input Field (Optional)

If desired, you may insert an Input field tied to this variable, so that users are asked for the value of the variable when a new document is created based on this template.

Related Links

Personal tools