set document library to unsearchable in workflow

by vickytan » Tue Mar 14, 2017 8:48 am

Is there any action/ way to set new document library/list to unsearchable in workflow?? because i does not want the new document library/ list to appear in the search result.

other information:
i'm using the sharepoint designer 2013.
Thanks.
Last edited by vickytan on Tue Mar 14, 2017 9:38 am, edited 1 time in total.
vickytan
 
Posts: 4
Joined: Tue Mar 14, 2017 8:36 am

by Roman Rylov » Tue Mar 14, 2017 9:34 am

Hello,

Yes, you need to switch on NoCrawl flag for the list/document library. To do this you can use the following PowerShell Script.

Code: Select all
$web = Get-SPWeb "http://yoursite/sites/Dev/"
$list = $web.Lists["Documents"]
$list.NoCrawl = $true
$list.Update()
User avatar
Roman Rylov
 
Posts: 335
Joined: Tue Nov 11, 2014 6:25 pm

by vickytan » Wed Mar 15, 2017 6:29 am

Roman Rylov wrote:Hello,

Yes, you need to switch on NoCrawl flag for the list/document library. To do this you can use the following PowerShell Script.

Code: Select all
$web = Get-SPWeb "http://yoursite/sites/Dev/"
$list = $web.Lists["Documents"]
$list.NoCrawl = $true
$list.Update()


Hello Roman, Sorry that I did mention my problem well. I have update my question. Hope you can help. Thank you.
vickytan
 
Posts: 4
Joined: Tue Mar 14, 2017 8:36 am

by Roman Rylov » Wed Mar 15, 2017 7:29 am

Unfortunately, using workflow you cannot do this.
Could you please describe your business case? Why do you need to do this exactly from a workflow?
User avatar
Roman Rylov
 
Posts: 335
Joined: Tue Nov 11, 2014 6:25 pm


Return to Workflow Actions Pack for SharePoint 2013