I found a solution by joining the List with the Hidden Userinfo-List, on that Join I was able to do a filter on the username.
Here´s the View-XML for doing that:
<View>
<Joins>
<Join Type='INNER' ListAlias='User Information List'>
<Eq>
<FieldRef Name='UserField' RefType='Id' />
<FieldRef List='User Information List' Name='ID' />
</Eq>
</Join>
</Joins>
<Query>
<Where>
<Eq>
<FieldRef Name='MyUserName' />
<Value Type='Text'>Domain\UserName</Value>
</Eq>
</Where>
</Query>
<ProjectedFields>
<Field Name='MyUserName' Type='Lookup' List='User Information List' ShowField='Name' />
</ProjectedFields>
</View>
(Beware: You have to do a double-Backslash for between Domain and Username when setting the XML-String to the query, because it removes one of them)
Additionaly you can also set ViewFields, for minimizing the result for faster response
Keine Kommentare:
Kommentar veröffentlichen