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>
83               <emph/>area, select the <item type="menuitem">Hide</item> check box.</paragraph>
84         </listitem>
85         <listitem>
86            <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>
87         </listitem>
88         <listitem>
89            <paragraph xml-lang="en-US" id="par_id3155573" role="listitem" l10n="U" oldref="107">Click <emph>Insert</emph> and then save the document.</paragraph>
90         </listitem>
91      </list>
92      <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>
93      <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>
94      <table id="tbl_id3147793">
95         <tablerow>
96            <tablecell>
97               <paragraph xml-lang="en-US" id="par_id3147819" role="tablehead" l10n="U" oldref="62">User variables</paragraph>
98            </tablecell>
99            <tablecell>
100               <paragraph xml-lang="en-US" id="par_id3147218" role="tablehead" l10n="U" oldref="63">Meaning</paragraph>
101            </tablecell>
102         </tablerow>
103         <tablerow>
104            <tablecell>
105               <paragraph xml-lang="en-US" id="par_id3147245" role="code" l10n="U" oldref="64">user_firstname</paragraph>
106            </tablecell>
107            <tablecell>
108               <paragraph xml-lang="en-US" id="par_id3147268" role="paragraph" l10n="U" oldref="65">First name</paragraph>
109            </tablecell>
110         </tablerow>
111         <tablerow>
112            <tablecell>
113               <paragraph xml-lang="en-US" id="par_id3145592" role="code" l10n="U" oldref="66">user_lastname</paragraph>
114            </tablecell>
115            <tablecell>
116               <paragraph xml-lang="en-US" id="par_id3145615" role="paragraph" l10n="U" oldref="67">Last name</paragraph>
117            </tablecell>
118         </tablerow>
119         <tablerow>
120            <tablecell>
121               <paragraph xml-lang="en-US" id="par_id3145642" role="code" l10n="U" oldref="68">user_initials</paragraph>
122            </tablecell>
123            <tablecell>
124               <paragraph xml-lang="en-US" id="par_id3145666" role="paragraph" l10n="U" oldref="69">Initials</paragraph>
125            </tablecell>
126         </tablerow>
127         <tablerow>
128            <tablecell>
129               <paragraph xml-lang="en-US" id="par_id3151200" role="code" l10n="U" oldref="70">user_company</paragraph>
130            </tablecell>
131            <tablecell>
132               <paragraph xml-lang="en-US" id="par_id3151223" role="paragraph" l10n="U" oldref="71">Company</paragraph>
133            </tablecell>
134         </tablerow>
135         <tablerow>
136            <tablecell>
137               <paragraph xml-lang="en-US" id="par_id3151250" role="code" l10n="U" oldref="72">user_street</paragraph>
138            </tablecell>
139            <tablecell>
140               <paragraph xml-lang="en-US" id="par_id3152912" role="paragraph" l10n="U" oldref="73">Street</paragraph>
141            </tablecell>
142         </tablerow>
143         <tablerow>
144            <tablecell>
145               <paragraph xml-lang="en-US" id="par_id3152940" role="code" l10n="U" oldref="74">user_country</paragraph>
146            </tablecell>
147            <tablecell>
148               <paragraph xml-lang="en-US" id="par_id3152963" role="paragraph" l10n="U" oldref="75">Country</paragraph>
149            </tablecell>
150         </tablerow>
151         <tablerow>
152            <tablecell>
153               <paragraph xml-lang="en-US" id="par_id3152990" role="code" l10n="U" oldref="76">user_zipcode</paragraph>
154            </tablecell>
155            <tablecell>
156               <paragraph xml-lang="en-US" id="par_id3145679" role="paragraph" l10n="U" oldref="77">Zip Code</paragraph>
157            </tablecell>
158         </tablerow>
159         <tablerow>
160            <tablecell>
161               <paragraph xml-lang="en-US" id="par_id3145706" role="code" l10n="U" oldref="78">user_city</paragraph>
162            </tablecell>
163            <tablecell>
164               <paragraph xml-lang="en-US" id="par_id3145729" role="paragraph" l10n="U" oldref="79">City</paragraph>
165            </tablecell>
166         </tablerow>
167         <tablerow>
168            <tablecell>
169               <paragraph xml-lang="en-US" id="par_id3145756" role="code" l10n="U" oldref="80">user_title</paragraph>
170            </tablecell>
171            <tablecell>
172               <paragraph xml-lang="en-US" id="par_id3145779" role="paragraph" l10n="U" oldref="81">Title</paragraph>
173            </tablecell>
174         </tablerow>
175         <tablerow>
176            <tablecell>
177               <paragraph xml-lang="en-US" id="par_id3156284" role="code" l10n="U" oldref="82">user_position</paragraph>
178            </tablecell>
179            <tablecell>
180               <paragraph xml-lang="en-US" id="par_id3156307" role="paragraph" l10n="U" oldref="83">Position</paragraph>
181            </tablecell>
182         </tablerow>
183         <tablerow>
184            <tablecell>
185               <paragraph xml-lang="en-US" id="par_id3156334" role="code" l10n="U" oldref="84">user_tel_work</paragraph>
186            </tablecell>
187            <tablecell>
188               <paragraph xml-lang="en-US" id="par_id3156357" role="paragraph" l10n="U" oldref="85">Business telephone number</paragraph>
189            </tablecell>
190         </tablerow>
191         <tablerow>
192            <tablecell>
193               <paragraph xml-lang="en-US" id="par_id3156384" role="code" l10n="U" oldref="86">user_tel_home</paragraph>
194            </tablecell>
195            <tablecell>
196               <paragraph xml-lang="en-US" id="par_id3149728" role="paragraph" l10n="U" oldref="87">Home telephone number</paragraph>
197            </tablecell>
198         </tablerow>
199         <tablerow>
200            <tablecell>
201               <paragraph xml-lang="en-US" id="par_id3149756" role="code" l10n="U" oldref="88">user_fax</paragraph>
202            </tablecell>
203            <tablecell>
204               <paragraph xml-lang="en-US" id="par_id3149778" role="paragraph" l10n="U" oldref="89">Fax number</paragraph>
205            </tablecell>
206         </tablerow>
207         <tablerow>
208            <tablecell>
209               <paragraph xml-lang="en-US" id="par_id3149806" role="code" l10n="U" oldref="90">user_email</paragraph>
210            </tablecell>
211            <tablecell>
212               <paragraph xml-lang="en-US" id="par_id3147294" role="paragraph" l10n="U" oldref="91">E-mail address</paragraph>
213            </tablecell>
214         </tablerow>
215         <tablerow>
216            <tablecell>
217               <paragraph xml-lang="en-US" id="par_id3147321" role="code" l10n="U" oldref="92">user_state</paragraph>
218            </tablecell>
219            <tablecell>
220               <paragraph xml-lang="en-US" id="par_id3147344" role="paragraph" l10n="U" oldref="93">State</paragraph>
221            </tablecell>
222         </tablerow>
223      </table>
224
225      <section id="relatedtopics">
226         <embed href="text/swriter/guide/fields.xhp#fields"/>
227         <embed href="text/swriter/guide/conditional_text.xhp#conditional_text"/>
228         <embed href="text/swriter/guide/hidden_text.xhp#hidden_text"/>
229         <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>
230      </section>
231   </body>
232</helpdocument>