0

I have created a list workflow from SPD and assigned a task to the approvers group. The workflow is triggering fine but when i want to fetch some of the columns like WorkflowName is coming with blank. I also verified the Json response from REST API to check values are coming or not? But i found some of the properties are null.

Please some one help me how to fetch these details.

the below is my Json response from the WOrkflow Task list.

API: /_api/web/lists/getbytitle('Workflow Tasks')/items

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "id": "f63099fa-d207-4392-ad0d-384b11f4e967",
                    "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)",
                    "etag": "\"2\"",
                    "type": "SP.Data.WorkflowTasksItem"
                },
                "FirstUniqueAncestorSecurableObject": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/FirstUniqueAncestorSecurableObject"
                    }
                },
                "RoleAssignments": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/RoleAssignments"
                    }
                },
                "AttachmentFiles": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/AttachmentFiles"
                    }
                },
                "ContentType": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/ContentType"
                    }
                },
                "GetDlpPolicyTip": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/GetDlpPolicyTip"
                    }
                },
                "FieldValuesAsHtml": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/FieldValuesAsHtml"
                    }
                },
                "FieldValuesAsText": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/FieldValuesAsText"
                    }
                },
                "FieldValuesForEdit": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/FieldValuesForEdit"
                    }
                },
                "File": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/File"
                    }
                },
                "Folder": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/Folder"
                    }
                },
                "ParentList": {
                    "__deferred": {
                        "uri": "http://inhydvmrstpr02:8080/Iow/_api/Web/Lists(guid'eba6894b-9f6c-4435-86fe-de728ac5a9a3')/Items(46)/ParentList"
                    }
                },
                "FileSystemObjectType": 0,
                "Id": 46,
                "ContentTypeId": "0x0108003365C4474CAE8C42BCE396314E88E51F004B3581A3A187724E91023106EE3BD022",
                "Title": "Test task from R47",
                "PredecessorsId": {
                    "__metadata": {
                        "type": "Collection(Edm.Int32)"
                    },
                    "results": []
                },
                "Priority": "(2) Normal",
                "Status": "Not Started",
                "PercentComplete": null,
                "AssignedToId": 2,
                "TaskGroupId": null,
                "Body": "sfvhvsdf",
                "StartDate": "2020-10-30T09:32:23Z",
                "DueDate": "2020-10-30T01:00:00Z",
                "RelatedItems": "[{\"ItemId\":23,\"WebId\":\"0d2584b8-e9b0-4fb5-8590-b39d5cd52e34\",\"ListId\":\"8cbcc7fc-f045-4e88-88ac-a9dc0ac29085\"}]",
                "WorkflowLink": null,
                "OffsiteParticipant": null,
                "OffsiteParticipantReason": null,
                "WorkflowOutcome": null,
                "WorkflowName": null,
                "GUID": "9d48ca07-93f9-44a3-a277-74b0b9720744",
                "TaskOutcome": null,
                "ID": 46,
                "Modified": "2020-10-30T09:32:24Z",
                "Created": "2020-10-30T09:32:23Z",
                "AuthorId": 2,
                "EditorId": 2,
                "OData__UIVersionString": "2.0",
                "Attachments": false
            },
        

1 Answer 1

0

By default, this only works for workflow 2010. It would not show for workflow 2013.

You could create workflow 2010 instead to assign tasks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.