0

Background: Our SharePoint Task list threshold limit reached, means items are more than 5000. We have created custom view to manage the data view with help of indexed columns.

But there is logic in SharePoint 2013 designer workflow in which we need to get description column and few other columns of task which gets completed to save it as history purposes (which user took what action and when). Now to get information we use GUID return by Assign a task action of designer and query the completed task. Problem: Our SP designer workflow call for task list and filter items based on GUID. Below is the sample screenshot of call from designer.

SharePoint Call to our list

and once reaching this step it throws an error in workflow, and workflow got suspended, when I drill down the reason it was due to threshold limit, I tested it on browser as shown below Error that throw by above call in worklfow

My Approach: To cater above problem i only have 2 points in mind:

1) To call above by Item ID instead of GUID becuase Item ID will be indexed by defauly, but Assign a task action of SharePoint designer workfow return TaskID that contains GUID so that is the reason to filter items based on GUID, but GUID is not indexed columns, so it throw Microsoft.SharePoint.SPQueryThrottledException.

2) Need to make GUID as indexed column so that threshold error can be cater. but in list settings GUID cannot be set as indexed column as its not listed there.

Question: Is there any solution or any other way so that we can get information related to task in designer once the task completed.

1 Answers1

0

We had exactly the same problem in a SharePoint Online environment. SharePoint Designer WF generates a REST call like this to get a task from the WF's associated task list:

https://site/web/_api/web/lists(guid'1b7a4526-47da-4040-8df1-ba8a97543188')/Items?%24filter=**GUID**+**eq**+guid%2771c23273-2535-4dbb-869d-c3e608899ca0%27&%24select=ID%2CEditorId

I put an index on the 'GUID' column through powershell:

Add-PSSnapin Microsoft.sharepoint.powershell

$web = get-spweb '<URL>'
$list = $web.Lists['Workflow Tasks']
$field = $list.Fields['GUID'] 
$field.Indexed = $true
$field.Update()
$list.FieldIndexes.Add($field)

(You have to ensure that there are no more than 5000 items in the list before you can create the index)

We did it one week ago and all the suspended workflows are resumed successfully. Now there are ~5100 items in the task list and no problem with the GUID filter.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103