0

In my hosted app I have one text field which contains username. I have write following query in lists schema.xml

<View>
    <Query>
        <Where>
            <Contains>
                <FieldRef Name='Title'/>
                <Value Type='Text'>uname</Value>
            </Contains>
        </Where>
    </Query>
</View>

I want to replace the uname by current user login name.I dont know this will work or not . Please suggest some help for this situation

0

Try This

<View>
        <Query>
            <Where>
                <Contains>
                    <FieldRef Name='Title'/>
                    <Value Type='Text'><UserID/></Value>
                </Contains>
            </Where>
        </Query> 
   </View>
  • This would not work if the text column contains the user name only, as described in the question? – Robert Lindgren May 18 '16 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.