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