Dynamic key lookup inside Loop using formData context

Hi guys,

I’m building an offboarding workflow in SailPoint IdentityNow where a reviewer is asked to confirm which access profiles should be removed from a contractor.

The workflow sends a dynamic form listing the contractor’s current access profiles, each with a Yes/No option. Based on the reviewer’s responses, I need to remove the access profiles where the answer is “No.”

To achieve this, I:

  • Fetch the contractor’s access using Get Access
  • Send a dynamically generated Form
  • Loop through the access profiles
  • Pass formData as context into the loop

Here’s my loop configuration:

{
“actionId”: “sp:loop:iterator”,
“attributes”: {
“input.$”: “$.getAccess.accessItems”,
“context.$”: “$.form.formData”,
“start”: “Compare Strings”,
“steps”: { … }
}
}

Inside the loop:

$.loop.loopInput.name resolves correctly (e.g., “Entitlement-C”)
$.loop.context contains the full form response map

Example formData:

{
“Entitlement-B”: “Yes”,
“Entitlement-C”: “No”,
“Entitlement-D”: “No”,
“Entitlement-E”: “Yes”
}

Example access items:

[
{ “id”: “abc123”, “name”: “Entitlement-B”, “type”: “ACCESS_PROFILE” },
{ “id”: “abc124”, “name”: “Entitlement-C”, “type”: “ACCESS_PROFILE” },
{ “id”: “abc125”, “name”: “Entitlement-D”, “type”: “ACCESS_PROFILE” },
{ “id”: “abc126”, “name”: “Entitlement-E”, “type”: “ACCESS_PROFILE” }
]

From execution logs, I can confirm that the context is correctly passed:

map[Entitlement-B:Yes Entitlement-C:No Entitlement-D:No Entitlement-E:Yes]

What I’m trying to do

Inside the loop, I need to dynamically fetch the reviewer’s response for the current entitlement, something like:

$.loop.context[$.loop.loopInput.name]

For example:

When loopInput.name = “Entitlement-C” → expected result = “No”
What I’m getting
Loop executes successfully
loopInput.name is correct
context is available

However, the dynamic lookup expression does not resolve any value.

What I expected

For each iteration, I expected to retrieve the corresponding value from formData (e.g., “No”) so I can conditionally remove that access profile.

Issue

There’s no explicit error, but it seems that JSONPath in SailPoint does not support dynamic key lookup using another field as the key.

Looking for help

Is there:

A native way in SailPoint workflows to dynamically access object values using a variable key?

Or a recommended approach to:

  • List item
  • Take formData and accessItems
  • Filter items where response = “No”
  • Return a usable array for access removal?

As far as I know JSON path in SailPoint does not support dynamic key lookup like $.loop.context[$.loop.loopInput.name].

Better approach would be to use Script to corelate accessItem with formData.

Try checking your code with Json path evaluator Json Path Evaluator | SailPoint Developer Community