Identity Now Workflow JSON Path Filtering not triggering true

Im having a problem with an Identity Now workflow meant to trigger true upon
$.getAccess.accessItems[?(@.name)] contains Coupa

image

When accessed through the referenced JSON path tester referenced in this documentation:

We get the correct output of

filter:
$.getAccess.accessItems[?(@.name contains 'Coupa')]
output: 
[
	{
		"name": "Coupa (test) - KMX Standard Field Non Mgr Service Ops ERO",
		"id": "",
		"type": "ROLE"
	},
	{
		"name": "Coupa (dark) - KMX Standard Field Non Mgr Service Ops ERO",
		"id": "",
		"type": "ROLE"
	},
	{
		"name": "Coupa (test) - Workflow Test",
		"id": "",
		"type": "ROLE"
	}
]

Where if the role contains Coupa in the JSONPath online interpreter, I put the output of the test workflow for getAcess.accessItems and recieved all and only the names that contain coupa.

Does IDN support this type of filtering? The documentation specifically says it supports includes and its a pre selected filter on the workflow. Maybe it doesn’t support it on multivalued item? Is it because in the workflow the ‘contains’ is being forced outside the () in the [(@name)]? I noticed that in the jsonpath interpreter, [?(@.name contains ‘Coupa’)], it returns correctly, but [?(@.name)] contains “Coupa”, it does not. Thanks!

Yes, I checked the above json using contains and it somehow is not working. But, remember we can do the same thing in a lot of different ways. In your case, we can utilize the power of regular expression to accomplish your task. Please find the filter condition below to use in your scenario which works perfectly.

$[?(@.name=~/.*Coupa.*/i)]

Let me know if it worked or not.

I’m not sure you actually need the filter expression in the JSONPath, have you tried without it?

$.getAccess.accessItems[*].name

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