OpenOffice.org OpenOffice - 3.3 Manual de usuario Pagina 399

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 464
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 398
You cannot use internal variables (for example, page number or chapter name) to
formulate conditions.
The examples in this chapter use user-defined variables.
Define a logical expression (condition) involving the selected variable
The condition compares a specified fixed value with the contents of a variable or
database field.
To formulate a condition, use the same elements as you would to create a formula:
operators, mathematical and statistical functions, number formats, variables, and
constants. The possible operators are given in the online help; look in the index under
“operators: in formulas”. You can define quite complex expressions, but in most cases
a simple condition will do the job.
Create the variable
To create your variable, choose Insert > Fields > Other. You can use choices found
on the DocInformation, Variables, and Database pages.
DocInformation fields
“Using document properties to hold metadata and information that changes” on page
384 described how to set up a custom document property. You can use that document
property as the variable in your condition statement, or you can create another
document property field specifically for conditions.
User-defined variable field
To set up a variable or user field:
1) Place the cursor where you want the field to be inserted.
2) On the Fields dialog box, select the Variables page (Figure 398).
3) Select Set variable in the Type list and Text in the Format list. Type a name
for the variable in the Name box, and a value in the Value box. I have chosen
ProLite for the name (to remind me that this variable is related to the two
product versions), and I set the value as Lite because I can remember “If it is
the Lite version, then this text should be hidden.”
4) Select Invisible so the field does not show in the document. Click Insert, then
click Close.
Chapter 14 Working with Fields 399
Vista de pagina 398
1 2 ... 394 395 396 397 398 399 400 401 402 403 404 ... 463 464

Comentarios a estos manuales

Sin comentarios