0

in a declarative / visual studio workflow we want to filter a list and use a httpSend activity with

http://mysite/_api/web/lists/GetByTitle('myList')/items?$filter=Title eq 'customer'

for the uri request parameter. Result = no item. Putting this URL in the Browser we get the item properties as well as with

http://mysite/_api/web/lists/GetByTitle('myList')/items(1)

So the item is there (the httpSend Header is on "application/json; odata=verbose").

Could it be that the httpSend has got Problems with the filter syntax and the spaces around 'eq'? How to examine this? How to resolve this?

2
  • Works for me, are you sure that is the internal name? The EQ operator is (by design) case sensitive. – Mike Oct 17 '14 at 14:25
  • But "AuthorId" and all the other standard fields doesn't work either. I think it's a question of wrong property syntax within the httpSend activity. Is the prefix "d." like in "d.AuthorId" the right one? – Celophysis Oct 19 '14 at 5:12
0

The trick is that a request with a filter argument creates a service response of different syntax. If we use a request like

http://mysite/_api/web/lists/GetByTitle('myList')/items(1)

the response scheme starts with the tag "entry" whereas if we use filter like in

http://mysite/_api/web/lists/GetByTitle('myList')/items?$filter=Title eq 'customer'

the list items retrieved are stored in an array "results".

So the best way is partly taken from the documentation blogs_msdn_thirusrinivasan1 concerning "Looping Thru Response Collection". We've used a GetDynamicValueProperties activity on "d.results". Then to get the list items we loop through results with a ForEach activity. That's it.

To get an idea what to look for in the service response some tools are helpful. In our case we've taken "Advanced REST client" from (Chrome). With this we could examine the json scheme we get.

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.