locked
How to get workflow task list ID? RRS feed

  • Question

  • I created simple workflow in Office 365 SharePoint 2013 using SharePoint Designer 2013.

    The action Assign a task to user (Task outcome to Variable: Outcome |Task ID to Variable: TaskID) was used.

    The variable TaskID had a value something look like 902aa0e9-0d58-47c0-a3ba-da96ebd47651, but I need ID from a task list.

    How to get the task list ID in SharePoint Designer Workflow?

    I am very grateful in advance for any help.


    bnossov

    Saturday, April 5, 2014 10:07 PM

Answers

  • Hi,

    According to your post, my understanding is that you wanted to get workflow task list ID.

    You need to do a look up on the task list with the GUID to the respective task.

    Then you can create a relationship to the associated task by taking the GUID and using that as a lookup as below:

    Thanks,

    Linda Li

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Linda Li
    TechNet Community Support

    • Marked as answer by JasonGuo Sunday, April 13, 2014 1:58 PM
    Monday, April 7, 2014 8:07 AM

All replies

  • can you explain more what ext you want. 
    Sunday, April 6, 2014 1:20 PM
  • Did you try fetching it via REST API?

    {Web Url}/_api/lists/getbytitle('workflow%20tasks')/items?$filter=GUID eq '{Task Item ID}'

    CALLING THE SHAREPOINT 2013 REST API FROM A SHAREPOINT DESIGNER WORKFLOW


    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

    Sunday, April 6, 2014 5:00 PM
  • Hi,

    According to your post, my understanding is that you wanted to get workflow task list ID.

    You need to do a look up on the task list with the GUID to the respective task.

    Then you can create a relationship to the associated task by taking the GUID and using that as a lookup as below:

    Thanks,

    Linda Li

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Linda Li
    TechNet Community Support

    • Marked as answer by JasonGuo Sunday, April 13, 2014 1:58 PM
    Monday, April 7, 2014 8:07 AM
  • Dear Linda,

    It works.

    Thank you very much.


    bnossov

    Monday, April 7, 2014 6:08 PM
  • I created dictionary and create two variables:

    Name: Accept; Type: string; Value:  application/json;odata=verbose;

    Name: Content-Type ; Type: string; Value: application/json;odata=verbose;

    Output variable: JSonRequestHeader.

    I called HTTP web service:

    https://xxxxxx/_api/web/Lists/getbytitle('WorkflowTaskList')/items?$select=ID

    I used Count Items in Variables: JsonRequestHeader(Output to Variable: count)

    The output variable count had value equals 2.

    When I printed service url in browser it gave me xml with all the items ID in the

    WorkflowTaskList.  There were eight .

    How can I take data from web service and put them in dictionary?

    I would be grateful for any help.


    bnossov

    Friday, April 11, 2014 2:00 AM
  • Hi,

    It would be better to create a separate forum post specifically for your question. It will help other people who experienced this unique issue to see/help too. You can also link to the new post here so I can follow up with you there. Thank you for your understanding and support.

    Thanks,

    Linda Li

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Linda Li
    TechNet Community Support

    Friday, April 11, 2014 2:13 AM
  • If I add that lookup, the workflow gets suspended with this error:

    RequestorId: ed7fdbfb-4b17-fa59-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: input at System.Guid.Parse(String input) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Exception from activity ParseGuid Sequence If DynamicActivity<Guid> DynamicActivity<String> FormatString Else If Stage 1 Sequence Flowchart Sequence PRF approval 5.WorkflowXaml_7f2c187a_c3a1_4ff3_89e1_1659986d180e

    What's the problem ?

    Thanks

    Monday, April 18, 2016 10:30 AM