Add new subsites to list

  • 22 August 2016
  • 1 reply
  • 1 view

Badge

Hello,

I need to create a workflow that periodically checks a site for new subsites and if there are new subsites it then needs to add those subsites to a list with a link to the subsite. Is something like this possible?

Thanks,

Greg


1 reply

Badge +11

Hi Greg,

you can use the Webs.GetAllSubWebCollection method from the SharePoint Web-WebService. You can save the result in a collection variable. This will be a list of all webs/subwebs in your current site collection (including title + url).

You then use a "For Each" action to loop through this collection and check for each item, if it is already present in your subweb-list. If not, add it.

Cheers

Philipp

Reply