Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Filter list items created by ME - SharePoint Online

$
0
0

Hi there,

I'm trying to retrieve data from a list where the items are created by ME

This is what I'm using but it doesn't seem to be working.

var userName = _spPageContextInfo.userDisplayName;

var url="/_api/Web/Lists/GetByTitle('My Links')/Items?$top=3&$filter=Author eq "+userName;


I also tried using user Id

var userId = _spPageContextInfo.userId;

var url="/_api/Web/Lists/GetByTitle('My Links')/Items?$top=3&$filter=CreatedById eq "+userId;

Any help will be greatly appreciated.

Many Thanks


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>