Calling a Manager ID from changes Array in Workflows

I created a WF and I’m trying to call the ID of the new/old manager under the array of changes (with which I started the WF as a trigger). according to the logs, it seems I’m calling the right place, but I don’t seem to get the value, attaching the input snapshot of the operator trying to call the value:
image
I have tried:
$.trigger.changes[0].newValue.id
$.trigger.changes[?(@.attribute == “manager”)].newValue.id
$.trigger.changes[?(@.attribute == “manager”)]size 1.newValue.id

Try using:

$.trigger.changes[?(@.attribute == ‘manager’)].newValue.id
$.trigger.changes[?(@.attribute == ‘manager’)].oldValue.id

Thanks Sharvari, unfortunately this is also not working, do you have another suggestion?

These usually work for the standard Identity Attributes Changed trigger JSON output.

You can try using the JSONPath Evaluator to find the right value for you: http://jsonpath.com/

What error are you getting? Does it say cannot find an Object or something like that? (Code 4**)?

Try testing the workflow with some valid id of a user you have in your system for the following section of WF Input:

    {
      "attribute": "manager",
      "oldValue": {
        "id": "idOfAnExistingUser",
        "name": "validName",
        "type": "IDENTITY"
      },
      "newValue": {
        "id": "idOfAnotherExistingUser",
        "name": "validName",
        "type": "IDENTITY"
      }
    }

Workflow test runs an actual process and to complete the process it needs to find an existing Identity in your tenant for the manager based on input id

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.