1<?xml version="1.0" encoding="UTF-8"?>
2<helpdocument version="1.0">
3
4<!--***********************************************************
5 *
6 * Licensed to the Apache Software Foundation (ASF) under one
7 * or more contributor license agreements.  See the NOTICE file
8 * distributed with this work for additional information
9 * regarding copyright ownership.  The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License.  You may obtain a copy of the License at
13 *
14 *   http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied.  See the License for the
20 * specific language governing permissions and limitations
21 * under the License.
22 *
23 ***********************************************************-->
24
25
26
27
28<meta>
29      <topic id="textswriterguidefields_userdataxml" indexer="include" status="PUBLISH">
30         <title xml-lang="en-US" id="tit">Querying User Data in Fields or Conditions</title>
31         <filename>/text/swriter/guide/fields_userdata.xhp</filename>
32      </topic>
33   </meta>
34   <body>
35<bookmark xml-lang="en-US" branch="index" id="bm_id3153398"><bookmark_value>fields; user data</bookmark_value>
36      <bookmark_value>user data; querying</bookmark_value>
37      <bookmark_value>conditions; user data fields</bookmark_value>
38      <bookmark_value>hiding;text, from specific users</bookmark_value>
39      <bookmark_value>text; hiding from specific users, with conditions</bookmark_value>
40      <bookmark_value>user variables in conditions/fields</bookmark_value>
41</bookmark>
42<paragraph xml-lang="en-US" id="hd_id3153398" role="heading" level="1" l10n="U"
43                 oldref="59"><variable id="fields_userdata"><link href="text/swriter/guide/fields_userdata.xhp" name="Querying User Data in Fields or Conditions">Querying User Data in Fields or Conditions</link>
44</variable></paragraph>
45      <paragraph xml-lang="en-US" id="par_id3154239" role="paragraph" l10n="U" oldref="60">You can access and compare some user data from conditions or fields. For example, you can compare user data with the following operators:</paragraph>
46      <table id="tbl_id3154255">
47         <tablerow>
48            <tablecell>
49               <paragraph xml-lang="en-US" id="par_id3155889" role="tablehead" l10n="U" oldref="94">Operator</paragraph>
50            </tablecell>
51            <tablecell>
52               <paragraph xml-lang="en-US" id="par_id3147110" role="tablehead" l10n="U" oldref="95">Meaning</paragraph>
53            </tablecell>
54         </tablerow>
55         <tablerow>
56            <tablecell>
57               <paragraph xml-lang="en-US" id="par_id3150508" role="tablecontent" l10n="U" oldref="96">== or EQ</paragraph>
58            </tablecell>
59            <tablecell>
60               <paragraph xml-lang="en-US" id="par_id3150531" role="tablecontent" l10n="U" oldref="97">equals</paragraph>
61            </tablecell>
62         </tablerow>
63         <tablerow>
64            <tablecell>
65               <paragraph xml-lang="en-US" id="par_id3150725" role="tablecontent" l10n="U" oldref="98">!= or NEQ</paragraph>
66            </tablecell>
67            <tablecell>
68               <paragraph xml-lang="en-US" id="par_id3150748" role="tablecontent" l10n="U" oldref="99">is not equal to</paragraph>
69            </tablecell>
70         </tablerow>
71      </table>
72
73      <paragraph xml-lang="en-US" id="par_id3153167" role="paragraph" l10n="U" oldref="101">If you want, you can use a condition to hide specific text in your document from a specific user.</paragraph>
74      <list type="ordered">
75         <listitem>
76            <paragraph xml-lang="en-US" id="par_id3153190" role="listitem" l10n="U" oldref="102">Select the text in the document that you want to hide.</paragraph>
77         </listitem>
78         <listitem>
79            <paragraph xml-lang="en-US" id="par_id3145273" role="listitem" l10n="U" oldref="103">Choose <emph>Insert - Section</emph>.</paragraph>
80         </listitem>
81         <listitem>
82            <paragraph xml-lang="en-US" id="par_id3145297" role="listitem" l10n="U" oldref="104">In the <item type="menuitem">Hide</item> area, select the <item type="menuitem">Hide</item> check box.</paragraph>
83         </listitem>
84         <listitem>
85            <paragraph xml-lang="en-US" id="par_id3155533" role="listitem" l10n="U" oldref="105">In the <emph>With Condition</emph> box, type <emph>user_lastname == "Doe"</emph>, where "Doe" is the last name of the user that you want to hide the text from. </paragraph>
86         </listitem>
87         <listitem>
88            <paragraph xml-lang="en-US" id="par_id3155573" role="listitem" l10n="U" oldref="107">Click <emph>Insert</emph> and then save the document.</paragraph>
89         </listitem>
90      </list>
91      <paragraph xml-lang="en-US" id="par_id3147760" role="note" l10n="U" oldref="108">The name of the hidden section can still be seen in the Navigator.</paragraph>
92      <paragraph xml-lang="en-US" id="par_id3147777" role="paragraph" l10n="U" oldref="61">The following table is a list of the user variables that you can access when defining a condition or a field:</paragraph>
93      <table id="tbl_id3147793">
94         <tablerow>
95            <tablecell>
96               <paragraph xml-lang="en-US" id="par_id3147819" role="tablehead" l10n="U" oldref="62">User variables</paragraph>
97            </tablecell>
98            <tablecell>
99               <paragraph xml-lang="en-US" id="par_id3147218" role="tablehead" l10n="U" oldref="63">Meaning</paragraph>
100            </tablecell>
101         </tablerow>
102         <tablerow>
103            <tablecell>
104               <paragraph xml-lang="en-US" id="par_id3147245" role="code" l10n="U" oldref="64">user_firstname</paragraph>
105            </tablecell>
106            <tablecell>
107               <paragraph xml-lang="en-US" id="par_id3147268" role="paragraph" l10n="U" oldref="65">First name</paragraph>
108            </tablecell>
109         </tablerow>
110         <tablerow>
111            <tablecell>
112               <paragraph xml-lang="en-US" id="par_id3145592" role="code" l10n="U" oldref="66">user_lastname</paragraph>
113            </tablecell>
114            <tablecell>
115               <paragraph xml-lang="en-US" id="par_id3145615" role="paragraph" l10n="U" oldref="67">Last name</paragraph>
116            </tablecell>
117         </tablerow>
118         <tablerow>
119            <tablecell>
120               <paragraph xml-lang="en-US" id="par_id3145642" role="code" l10n="U" oldref="68">user_initials</paragraph>
121            </tablecell>
122            <tablecell>
123               <paragraph xml-lang="en-US" id="par_id3145666" role="paragraph" l10n="U" oldref="69">Initials</paragraph>
124            </tablecell>
125         </tablerow>
126         <tablerow>
127            <tablecell>
128               <paragraph xml-lang="en-US" id="par_id3151200" role="code" l10n="U" oldref="70">user_company</paragraph>
129            </tablecell>
130            <tablecell>
131               <paragraph xml-lang="en-US" id="par_id3151223" role="paragraph" l10n="U" oldref="71">Company</paragraph>
132            </tablecell>
133         </tablerow>
134         <tablerow>
135            <tablecell>
136               <paragraph xml-lang="en-US" id="par_id3151250" role="code" l10n="U" oldref="72">user_street</paragraph>
137            </tablecell>
138            <tablecell>
139               <paragraph xml-lang="en-US" id="par_id3152912" role="paragraph" l10n="U" oldref="73">Street</paragraph>
140            </tablecell>
141         </tablerow>
142         <tablerow>
143            <tablecell>
144               <paragraph xml-lang="en-US" id="par_id3152940" role="code" l10n="U" oldref="74">user_country</paragraph>
145            </tablecell>
146            <tablecell>
147               <paragraph xml-lang="en-US" id="par_id3152963" role="paragraph" l10n="U" oldref="75">Country</paragraph>
148            </tablecell>
149         </tablerow>
150         <tablerow>
151            <tablecell>
152               <paragraph xml-lang="en-US" id="par_id3152990" role="code" l10n="U" oldref="76">user_zipcode</paragraph>
153            </tablecell>
154            <tablecell>
155               <paragraph xml-lang="en-US" id="par_id3145679" role="paragraph" l10n="U" oldref="77">Zip Code</paragraph>
156            </tablecell>
157         </tablerow>
158         <tablerow>
159            <tablecell>
160               <paragraph xml-lang="en-US" id="par_id3145706" role="code" l10n="U" oldref="78">user_city</paragraph>
161            </tablecell>
162            <tablecell>
163               <paragraph xml-lang="en-US" id="par_id3145729" role="paragraph" l10n="U" oldref="79">City</paragraph>
164            </tablecell>
165         </tablerow>
166         <tablerow>
167            <tablecell>
168               <paragraph xml-lang="en-US" id="par_id3145756" role="code" l10n="U" oldref="80">user_title</paragraph>
169            </tablecell>
170            <tablecell>
171               <paragraph xml-lang="en-US" id="par_id3145779" role="paragraph" l10n="U" oldref="81">Title</paragraph>
172            </tablecell>
173         </tablerow>
174         <tablerow>
175            <tablecell>
176               <paragraph xml-lang="en-US" id="par_id3156284" role="code" l10n="U" oldref="82">user_position</paragraph>
177            </tablecell>
178            <tablecell>
179               <paragraph xml-lang="en-US" id="par_id3156307" role="paragraph" l10n="U" oldref="83">Position</paragraph>
180            </tablecell>
181         </tablerow>
182         <tablerow>
183            <tablecell>
184               <paragraph xml-lang="en-US" id="par_id3156334" role="code" l10n="U" oldref="84">user_tel_work</paragraph>
185            </tablecell>
186            <tablecell>
187               <paragraph xml-lang="en-US" id="par_id3156357" role="paragraph" l10n="U" oldref="85">Business telephone number</paragraph>
188            </tablecell>
189         </tablerow>
190         <tablerow>
191            <tablecell>
192               <paragraph xml-lang="en-US" id="par_id3156384" role="code" l10n="U" oldref="86">user_tel_home</paragraph>
193            </tablecell>
194            <tablecell>
195               <paragraph xml-lang="en-US" id="par_id3149728" role="paragraph" l10n="U" oldref="87">Home telephone number</paragraph>
196            </tablecell>
197         </tablerow>
198         <tablerow>
199            <tablecell>
200               <paragraph xml-lang="en-US" id="par_id3149756" role="code" l10n="U" oldref="88">user_fax</paragraph>
201            </tablecell>
202            <tablecell>
203               <paragraph xml-lang="en-US" id="par_id3149778" role="paragraph" l10n="U" oldref="89">Fax number</paragraph>
204            </tablecell>
205         </tablerow>
206         <tablerow>
207            <tablecell>
208               <paragraph xml-lang="en-US" id="par_id3149806" role="code" l10n="U" oldref="90">user_email</paragraph>
209            </tablecell>
210            <tablecell>
211               <paragraph xml-lang="en-US" id="par_id3147294" role="paragraph" l10n="U" oldref="91">E-mail address</paragraph>
212            </tablecell>
213         </tablerow>
214         <tablerow>
215            <tablecell>
216               <paragraph xml-lang="en-US" id="par_id3147321" role="code" l10n="U" oldref="92">user_state</paragraph>
217            </tablecell>
218            <tablecell>
219               <paragraph xml-lang="en-US" id="par_id3147344" role="paragraph" l10n="U" oldref="93">State</paragraph>
220            </tablecell>
221         </tablerow>
222      </table>
223
224      <section id="relatedtopics">
225         <embed href="text/swriter/guide/fields.xhp#fields"/>
226         <embed href="text/swriter/guide/conditional_text.xhp#conditional_text"/>
227         <embed href="text/swriter/guide/hidden_text.xhp#hidden_text"/>
228         <paragraph xml-lang="en-US" id="par_id3147392" role="paragraph" l10n="C"><link href="text/swriter/02/14020000.xhp" name="List of operators">List of operators</link></paragraph>
229      </section>
230   </body>
231</helpdocument>