I have a Infopath form, published to Sharepoint 2013, in which user selects exactly one person, using a people picker. Outside of form I have columns DisplayName and AccountID. I want user, who is viewing a list, to see only objects which are either modified by him, created by him, or if he was selected in form.
Trying to limit the view from browser-based view creator is most probably impossible, as neither of columns available outside are of type User
. I then moved to Sharepoint Designer 2013, and dived into CAML. This did not help either.
How can I check, if currently logged user is the same user, as the one selected in form? I tried using CAML, but to no effect(last FieldRef
is reference to column, in this example AccountID).
<Where>
<Or>
<Or>
<Eq>
<FieldRef Name="Editor"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
<Eq>
<FieldRef Name="Author"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Or>
<Eq>
<FieldRef Name="_638fe3aa_9161_4aa5_8bd1_862678d9fc06"/>
<Value Type="Integer">
<UserID Type="Integer"/>
</Value>
</Eq>
</Or>
</Where>
If this can be achieved from code in Infopath, or in any other way, the answer will be as well accepted - I do not want exactly CAML based answer, I want any workable answer to my problem :)