0

I'm designing a workflow in SharePoint designer that uses a HTTP web service step via GET method. I have used it successfully before but this time I think the issue is with the name of the list but I'm not sure how to fix it.

Now the original name of the list "Engineers' Items-Table". As you can see, there's an apostrophe in the name. So initially I tried the following url which returned 0 records:

https://<domain>/_api/web/lists/getbytitle('Engineers' Items-Table')/items/?$select=Id

Then I renamed the list to "Engineer Items-Table" and tried the url:

https://<domain>/_api/web/lists/getbytitle('Engineer Items-Table')/items/?$select=Id

which doesn't return any results either. I tried using escape character %27 instead of the apostrophe which is not working either. SharePoint doesn't throw any exception. Workflow completes without an issue but without returning any items from the list.

Really appreciate your input. Thanks.

kovac
  • 4,945
  • 9
  • 47
  • 90

1 Answers1

0

Instead of using "%27" use " ' " as escape character.

https://<domain>/_api/web/lists/getbytitle('Engineers'' Items-Table')/items/?$select=Id
  1. Renaming the list might not change the behaviour because what you'll be changing now will be only the display name.
  2. Next keep the query simple remove select as a start once you start getting result add select and filters.
  3. Use POSTMAN which is a Chrome extension helps you find the error quickly.
  • Hi sahilloona, thanks for your answer and the advice. I tried using the escape character you suggested but it didn't work. Thanks so much for the POSTMAN tip it seems great. However, when I try to use it it gives the following error: "Access denied. You do not have permission to perform this action or access this resource." I have already included the X-RequestDigest value but it's still giving this error. Any ideas? – kovac May 12 '16 at 07:34
  • Try to run using admin account. The escape character should work. In this case you actually do not have permissions to access this list. Check permissions again for the particular list. Are you able to get data from any other list, you could try that too. – TheBeginner May 12 '16 at 13:01
  • You are right it really should work. I am able to running the workflow as a with Full Control over the site. The weird thing is I tried with the list guid too. It works with every other list so far except this one. I will try using an app step to see if it works. Could it be a bug? Because when I get the guid it looks a bit different from the usual guids. – kovac May 13 '16 at 01:19
  • Hi sahilloona, both your answers are correct. I used your escape character and for the permission issue I used an appstep to execute the web service call. Thanks very much for your assistance! – kovac May 13 '16 at 01:43