4

I have following problem with my workflow:

The workflow should get every entry from the list which has the same user as the actual column.

But when I publish the workflow suspends and I get the error message "HTTP 500".

For the dictionary I use:

Accept

Content-Type

(application/json;odata=verbose)

Here are some Screenshots:

Workflow definition image

Workflow error image

enter image description here

enter image description here

When I log the Service-URL to the WF

  • Can you provide more details (screenshot?) on the request header and body content, HTTP 500 indicates that the problem lies in one of those. The details you provided about the dictionary are not clear is that two dictionary entries in the form of: Accept: application/json; odata=verbose Content-Type: application/json; odata=verbose – Martin Laukkanen Aug 4 '17 at 14:08
  • Sorry for the late Reply. I added 2 new screenshots for the Problem. Thanks for your help! The dictionary is added correct to the RequestHeaders. – Brick Aug 7 '17 at 6:04
2

I believe your problem is in the web service call URL, can you test that directly in the browser?

Looking at a custom list in SharePoint here I can see that the custom columns of the User type (People Picker) fields show as "UserId" only and not as an expandable field as you have it in your query string, so perhaps your URL should look like:

/_api/web/lists/GetByTitle('list name')/items?$select=[select fields]&$filter=UserId eq '[id]'

Either way if you test your url with a valid SP User ID in any browser you should get the expected response.

Finally you can also check the variables you are passing, ensure that [%Current Item:User%] is definitely just the SP User Id (e.g. an int like 10).

Hope that helps, Martin

  • Thanks for your help, but my call URL works fine in the browser but not in the workflow. The query is: "site/_api/web/lists/GetByTitle('name')/items?$select=Inventory_x0020_Number,Hostname,Model,Manufacturer&$expand=User&$select=User/ID&$filter=User/Id eq [%Current Item:User%]" And the current Item User is set to the ID. – Brick Aug 9 '17 at 5:49
  • If I don't use the $expand=User i get an "BadRequest-Error" in the ResponseCode... – Brick Aug 9 '17 at 7:43
  • The list is very big. (1898 entrys). Could this be another reason? – Brick Aug 9 '17 at 8:03
  • That's easy to test with a ?$top=1000 or something, however the default list view threshold is 5000. – Martin Laukkanen Aug 10 '17 at 8:03
  • Hi, for the comment about the $expand, if you're still getting errors, add some logging to the workflow to log the variables and such, you might find some variable has a strange value resulting in the error 500. – Martin Laukkanen Aug 11 '17 at 7:22
0

I solved my Problem! The reason was the "log Results:". After i deleted this line it worked fine.

Thanks for your help!

BR Manuel

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.