diff options
Diffstat (limited to 'source/text/swriter/01/04090200.xhp')
-rw-r--r-- | source/text/swriter/01/04090200.xhp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source/text/swriter/01/04090200.xhp b/source/text/swriter/01/04090200.xhp index c5b2343b92..8ff2a5a16a 100644 --- a/source/text/swriter/01/04090200.xhp +++ b/source/text/swriter/01/04090200.xhp @@ -37,8 +37,8 @@ <bookmark_value>databases;in conditions</bookmark_value> <bookmark_value>hiding; database fields</bookmark_value> </bookmark> -<paragraph xml-lang="en-US" id="hd_id3145828" role="heading" level="1"><variable id="defining_conditions"><link href="text/swriter/01/04090200.xhp">Defining Conditions</link> -</variable></paragraph> +<h1 id="hd_id3145828"><variable id="defining_conditions"><link href="text/swriter/01/04090200.xhp">Defining Conditions</link> +</variable></h1> <paragraph xml-lang="en-US" id="par_id3145242" role="paragraph">Conditions are logical expressions that you can use to control the display of <link href="text/swriter/01/04090000.xhp">fields</link> and <link href="text/swriter/01/04020000.xhp">sections</link> in your document. Although the following examples apply to fields, they also apply to sections.</paragraph> <paragraph xml-lang="en-US" id="par_id3147171" role="paragraph">You can define conditions for the following field types:</paragraph> <list type="ordered"> @@ -75,7 +75,7 @@ </tablerow> </table> - <paragraph xml-lang="en-US" id="par_id3147090" role="note">If you leave the <emph>Condition </emph>box empty, the condition is interpreted as not being met.</paragraph> + <note id="par_id3147090">If you leave the <emph>Condition </emph>box empty, the condition is interpreted as not being met.</note> <paragraph xml-lang="en-US" id="par_id3148980" role="paragraph">When you define a condition, use the same <link href="text/swriter/02/14020000.xhp">elements</link> for defining a formula, namely comparative operators, mathematical and statistical functions, number formats, variables and constants.</paragraph> <paragraph xml-lang="en-US" id="par_id3153638" role="paragraph">You can use the following types of variables when you define a condition:</paragraph> <list type="ordered"> @@ -93,7 +93,7 @@ </listitem> </list> <paragraph xml-lang="en-US" id="par_id3155916" role="paragraph">You cannot use internal variables, such as page and chapter numbers, in condition expression.</paragraph> - <paragraph xml-lang="en-US" id="hd_id3151375" role="heading" level="2">Conditions and Variables</paragraph> + <h2 id="hd_id3151375">Conditions and Variables</h2> <paragraph xml-lang="en-US" id="par_id3150122" role="paragraph">The following examples use a variable called "x":</paragraph> <table id="tbl_id3155867"> <tablerow> @@ -144,8 +144,8 @@ </tablerow> </table> - <paragraph xml-lang="en-US" id="par_id3150097" role="note">The "equal" comparative operator must be represented by two equal signs (==) in a condition. For example, if you define a variable "x" with the value of 1, you can enter the condition as x==1.</paragraph> - <paragraph xml-lang="en-US" id="hd_id3148791" role="heading" level="2">User Data</paragraph> + <note id="par_id3150097">The "equal" comparative operator must be represented by two equal signs (==) in a condition. For example, if you define a variable "x" with the value of 1, you can enter the condition as x==1.</note> + <h2 id="hd_id3148791">User Data</h2> <paragraph xml-lang="en-US" id="par_id3150028" role="paragraph">You can include user data when you define conditions. To change your user data, choose <switchinline select="sys"><caseinline select="MAC"><emph>%PRODUCTNAME - Preferences</emph></caseinline><defaultinline><emph>Tools - Options</emph></defaultinline></switchinline><emph> - $[officename] - User data</emph>. User data must be entered in the form of strings. You can query the user data with "==" (EQ), "!=" (NEQ), or "!"(NOT).</paragraph> <paragraph xml-lang="en-US" id="par_id3153124" role="paragraph">The following table lists user data variables and their meanings:</paragraph> <table id="tbl_id3153139"> @@ -159,7 +159,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3154026" role="tablecontent">user_firstname</paragraph> + <paragraph xml-lang="en-US" id="par_id3154026" localize="false" role="tablecontent">user_firstname</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3149953" role="tablecontent">First name</paragraph> @@ -167,7 +167,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3147272" role="tablecontent">user_lastname</paragraph> + <paragraph xml-lang="en-US" id="par_id3147272" localize="false" role="tablecontent">user_lastname</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3149601" role="tablecontent">Last name</paragraph> @@ -175,7 +175,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3150770" role="tablecontent">user_initials</paragraph> + <paragraph xml-lang="en-US" id="par_id3150770" localize="false" role="tablecontent">user_initials</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3155529" role="tablecontent">Initials</paragraph> @@ -183,7 +183,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3148705" role="tablecontent">user_company</paragraph> + <paragraph xml-lang="en-US" id="par_id3148705" localize="false" role="tablecontent">user_company</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3148728" role="tablecontent">Company</paragraph> @@ -191,7 +191,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3155361" role="tablecontent">user_street</paragraph> + <paragraph xml-lang="en-US" id="par_id3155361" localize="false" role="tablecontent">user_street</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3154222" role="tablecontent">Street</paragraph> @@ -199,7 +199,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3145108" role="tablecontent">user_country</paragraph> + <paragraph xml-lang="en-US" id="par_id3145108" localize="false" role="tablecontent">user_country</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3146885" role="tablecontent">Country</paragraph> @@ -207,7 +207,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3149580" role="tablecontent">user_zipcode</paragraph> + <paragraph xml-lang="en-US" id="par_id3149580" localize="false" role="tablecontent">user_zipcode</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3156241" role="tablecontent">Zip code</paragraph> @@ -215,7 +215,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3148922" role="tablecontent">user_city</paragraph> + <paragraph xml-lang="en-US" id="par_id3148922" localize="false" role="tablecontent">user_city</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3148945" role="tablecontent">City</paragraph> @@ -223,7 +223,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3156053" role="tablecontent">user_title</paragraph> + <paragraph xml-lang="en-US" id="par_id3156053" localize="false" role="tablecontent">user_title</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3159219" role="tablecontent">Title</paragraph> @@ -231,7 +231,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3156435" role="tablecontent">user_position</paragraph> + <paragraph xml-lang="en-US" id="par_id3156435" localize="false" role="tablecontent">user_position</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3145178" role="tablecontent">Position</paragraph> @@ -239,7 +239,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3150797" role="tablecontent">user_tel_work</paragraph> + <paragraph xml-lang="en-US" id="par_id3150797" localize="false" role="tablecontent">user_tel_work</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3150820" role="tablecontent">Business telephone number</paragraph> @@ -247,7 +247,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3150894" role="tablecontent">user_tel_home</paragraph> + <paragraph xml-lang="en-US" id="par_id3150894" localize="false" role="tablecontent">user_tel_home</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3155320" role="tablecontent">Home telephone number</paragraph> @@ -255,7 +255,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3154400" role="tablecontent">user_fax</paragraph> + <paragraph xml-lang="en-US" id="par_id3154400" localize="false" role="tablecontent">user_fax</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3153363" role="tablecontent">Fax number</paragraph> @@ -263,7 +263,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3153390" role="tablecontent">user_email</paragraph> + <paragraph xml-lang="en-US" id="par_id3153390" localize="false" role="tablecontent">user_email</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3154948" role="tablecontent">Email address</paragraph> @@ -271,7 +271,7 @@ </tablerow> <tablerow> <tablecell> - <paragraph xml-lang="en-US" id="par_id3145603" role="tablecontent">user_state</paragraph> + <paragraph xml-lang="en-US" id="par_id3145603" localize="false" role="tablecontent">user_state</paragraph> </tablecell> <tablecell> <paragraph xml-lang="en-US" id="par_id3150129" role="tablecontent">State (not in all $[officename] versions)</paragraph> @@ -280,7 +280,7 @@ </table> <paragraph xml-lang="en-US" id="par_id3150147" role="paragraph">For example, to hide a paragraph, text, or a section from a user with a specific initial, such as "LM", enter the condition: user_initials=="LM".</paragraph> - <paragraph xml-lang="en-US" id="hd_id3154115" role="heading" level="2">Conditions and Database Fields</paragraph> + <h2 id="hd_id3154115">Conditions and Database Fields</h2> <paragraph xml-lang="en-US" id="par_id3154128" role="paragraph">You can define conditions for accessing databases, or database fields. For example, you can check the contents of a database field from a condition, or use database fields in logical expressions. The following table lists a few more examples of using databases in conditions:</paragraph> <table id="tbl_id3154848"> <tablerow> @@ -331,18 +331,18 @@ </tablerow> </table> - <paragraph xml-lang="en-US" id="par_id3159247" role="note">Note the difference between the boolean NOT "!" and the comparative operator not equal "!=" (NEQ).</paragraph> + <note id="par_id3159247">Note the difference between the boolean NOT "!" and the comparative operator not equal "!=" (NEQ).</note> <paragraph xml-lang="en-US" id="par_id3153876" role="paragraph">When you refer to a database field in a condition, use the form Databasename.Tablename.Fieldname. If one of the names contains a character that is an operator, such as a minus sign (-), enclose the name in square brackets, for example, Databasename.[Table-name].Fieldname. Never use spaces inside field names.<comment>UFI: fixes bug #i25781# - but see #i25983#. Fixes also #i19571#</comment></paragraph> - <paragraph xml-lang="en-US" id="par_id3153891" role="heading" level="3">Example: Hiding an Empty Database Field</paragraph> + <h3 id="par_id3153891">Example: Hiding an Empty Database Field</h3> <paragraph xml-lang="en-US" id="par_id3150051" role="paragraph">You may want to create a condition that hides an empty field, for example, if the COMPANY field is empty for some of the data records.</paragraph> <paragraph xml-lang="en-US" id="par_id3150067" role="paragraph">Select the <emph>Hidden Paragraph</emph> list entry, and type the following condition: Addressbook.Addresses.Company EQ ""</paragraph> <paragraph xml-lang="en-US" id="par_id3147110" role="paragraph">or type the following</paragraph> <paragraph xml-lang="en-US" id="par_id3147123" role="paragraph">NOT Addressbook.Addresses.Company</paragraph> <paragraph xml-lang="en-US" id="par_id3147136" role="paragraph">If the COMPANY database field is empty, the condition is true and the paragraph is hidden.</paragraph> - <paragraph xml-lang="en-US" id="par_id3150232" role="note">To display hidden paragraphs on the screen, choose <switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline><menuitem> - %PRODUCTNAME Writer - View</menuitem>, and clear the <emph>Hidden paragraphs</emph> check box.</paragraph> - <paragraph xml-lang="en-US" id="hd_id3145218" role="heading" level="2">Examples of Conditions in Fields</paragraph> + <note id="par_id3150232">To display hidden paragraphs on the screen, choose <switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline><menuitem> - %PRODUCTNAME Writer - View</menuitem>, and clear the <emph>Hidden paragraphs</emph> check box.</note> + <h2 id="hd_id3145218">Examples of Conditions in Fields</h2> <paragraph xml-lang="en-US" id="par_id3145231" role="paragraph">The following examples use the Conditional text field, although they can be applied to any fields that can be linked to a condition. The syntax used for conditions is also used for the Hidden text, Hidden paragraph, Any record or Next record fields.</paragraph> - <paragraph xml-lang="en-US" id="hd_id3150311" role="heading" level="2">To display conditional text based on the number of pages:</paragraph> + <h2 id="hd_id3150311">To display conditional text based on the number of pages:</h2> <list type="ordered"> <listitem> <paragraph xml-lang="en-US" id="par_id3150333" role="listitem">Choose <emph>Insert - Field - More Fields</emph>, and then click the <emph>Functions</emph> tab.</paragraph> @@ -363,7 +363,7 @@ <paragraph xml-lang="en-US" id="par_id3153086" role="listitem">Click <emph>Insert</emph>, and then click <emph>Close</emph>.</paragraph> </listitem> </list> - <paragraph xml-lang="en-US" id="hd_id3155814" role="heading" level="2">To display conditional text based on a user-defined Variable</paragraph> + <h2 id="hd_id3155814">To display conditional text based on a user-defined Variable</h2> <list type="ordered"> <listitem> <paragraph xml-lang="en-US" id="par_id3155836" role="listitem">Choose <emph>Insert - Field - More Fields</emph>, and then click the <emph>Variables</emph> tab.</paragraph> @@ -397,7 +397,7 @@ </listitem> </list> <paragraph xml-lang="en-US" id="par_id3154389" role="paragraph">To edit the contents of the "Profit" variable, double-click the variable field.</paragraph> - <paragraph xml-lang="en-US" id="hd_id3155573" role="heading" level="2">To display conditional text based on the contents of a database field:</paragraph> + <h2 id="hd_id3155573">To display conditional text based on the contents of a database field:</h2> <paragraph xml-lang="en-US" id="par_id3155587" role="paragraph">The first part of this example inserts a space between the "First Name" and "Last Name" fields in a document, and the second part inserts text based on the contents of a field. This example requires that an address data source is registered with $[officename].</paragraph> <list type="ordered"> <listitem> |