0

I'm building a Dictionary in SP2013 using the Call HTTP web service action. I've set the URL to:

[%Workflow Context:Current Site URL%]/_api/web/Lists/getbytitle('mylist')/items?$select=Id, Title

This successfully returns all the items in the list 'myList'.

How can I return just some of the items in 'myList'?

0

You can limit items using following operators

$top: If you put $top=50, query will return you first 50 items. Next 50 items can requested through __next URL

$filter: specifies which items to return

Let's say you want to get first 50 items from your list. You have to use $top like following

[%Workflow Context:Current Site URL%]/_api/web/Lists/getbytitle('mylist')/items?$select=Id,Title&$top=50
3
  • Thanks Atish. I did managed to find what I need was $filter. However I'm getting a reserved character warning when trying to save: [%Workflow Context:Current Site URL%]/_api/web/Lists/getbytitle('myList')/items?$filter=Title eq [%Variable: Title%]&$select=Id,Title. Do you know how to set a filter to workflow variable?
    – sansSpoon
    Nov 6 '15 at 7:18
  • I did not try that yet... You can ask another question for it. I think I have answered your first question. Nov 6 '15 at 7:23
  • I have created URL like [%Workflow Context:Current Site URL%]/_api/web/Lists/getbytitle('myList')/items?$filter=Title eq [%Variable: Title%]&$select=Id,Title and it did not give any warning. Title is string variable. Workflow variable is not the source of your warning I guess Nov 6 '15 at 7:37

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.