Skip to main content

First post on this forum so hoping someone can help me 🙂
 

  • I have a custom list with a list of users and a multi-select tick-box with CountryCode-City, e.g. UK-LO, FR-PA or DE-BE.
  • I have created a workflow firstly takes all the CountryCodes-City that have been assigned to a user and places them in a collection. This is all working and if I output into Log it shows as UK-LO;FR-PA;DE-BE.
  • I then have associated SharePoint groups with names like UK-LO_INT.
  •  I have a "For Each" loop that runs through the collection, initially it takes the CountryCode-City and concatenates using a "Build string" to "_INT". Again this is working as output to a Log.
  • When it runs it works for the first one and adds the username to the SP Group using a "Call web service".
  • When it runs against the second CountryCode-City in the collection it errors with "Failed to invoke web service. Error returned from server: <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."
    "An error has occurred in Populate SP Group Workflow."

 

Thank you in advance

Hi @NeilHions 



 



Does 2nd value seem correctly formatted? As a test, is it possible to send just that value to the webservice, to confirm the issue isn't with the syntax.



 



If that works, then I'd suggest adding a 1min pause at the end of the loop; I've seen web request actions fail when they are in a loop action, as the corresponding server is unable to keep up with the large number of requests being sent.



 



Hope that helps,



 



Sumit


Hi Sumit,



I have tried putting in a pause and unfortunately it still fails, changed the value to 5 minutes (which I believe is the lowest value anyway due to how the SP Timer works - unless this has changed in SP 2019).



 



If I change the order of the groups it is adding the username to, again it is successful wit the first one and then fails with the subsequent (even if it was successful when this group was it was first in the order previously). As mentioned I output the name of the group to the history log and it has the correct name (no spaces etc).



 


Reply