# Workflow error while using a filter option

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-error-while-using-a-filter-option/8988>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows\
**Created:** [March 7, 2023, 8:29am UTC](https://developer.sailpoint.com/discuss/t/workflow-error-while-using-a-filter-option/8988 "2023-03-07T08:29:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankitha09](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@Ankitha09](https://developer.sailpoint.com/discuss/u/Ankitha09)\
**Post date:** [March 7, 2023, 8:29am UTC](https://developer.sailpoint.com/discuss/t/workflow-error-while-using-a-filter-option/8988/1 "2023-03-07T08:29:06Z")

</div>

Hi,

We have created a workflow to raise a jira ticket when ever a Access request is approved which is coming from AWS Dev source. So we used the first step as the Trigger “Access Request Decision”. I need to add a filter so that the workflow triggers only for the application AWS Dev and not for all Access requests. I have used the JSONPath

$.trigger.requestedItemsStatus[?(@.clientMetadata.applicationName == ‘AWS Dev’)] which is showing error

Can you please suggest the correct JSONPath for filtering. This is a bit high priority.

sample input given while testing-

```json
{
“accessRequestId”: “4b4d982dddff4267ab12f0f1e72b5a6d”,
“requestedItemsStatus”: [
{
“id”: “2c91808b6ef1d43e016efba0ce470904”,
“name”: “Engineering Access”,
“description”: “Engineering Access”,
“type”: “ACCESS_PROFILE”,
“operation”: “Add”,
“clientMetadata”: {
“applicationName”: “My application”
},
“approvalInfo”: [
{
“approver”: {
“id”: “2c91808b6ef1d43e016efba0ce470910”,
“name”: “Stephen Austin”,
“type”: “IDENTITY”
},
“approverName”: “Stephen.Austin”,
“approvalDecision”: “APPROVED”,
“approvalComment”: " this is an approval comment"
}
],
“comment”: “requester comments”
}
],
“requestedBy”: {
“id”: “2c91808b6ef1d43e016efba0ce470906”,
“name”: “Adam Admin”,
“type”: “IDENTITY”
},
“requestedFor”: {
“id”: “2c91808b6ef1d43e016efba0ce470909”,
“name”: “Ed Engineer”,
“type”: “IDENTITY”
}
}

```

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [April 4, 2023, 2:21pm UTC](https://developer.sailpoint.com/discuss/t/workflow-error-while-using-a-filter-option/8988/2 "2023-04-04T14:21:37Z")

</div>

I believe this is because your filter expression is using the unicode equivalent of an apostrophe/single quote. You need to use the ASCII version of a single quote, which you can get by manually typing the `'` character from your keyboard. I got the same issue as you when copying and pasting your example in my workflow, but it was successful when I replaced the single quotes with the correct ASCII version.

Invalid unicode quotes: `$.trigger.requestedItemsStatus[?(@.clientMetadata.applicationName == ‘AWS Dev’)] `

Valid ASCII quotes: `$.trigger.requestedItemsStatus[?(@.clientMetadata.applicationName == 'AWS Dev')] `

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 19, 2023, 2:24pm UTC](https://developer.sailpoint.com/discuss/t/workflow-error-while-using-a-filter-option/8988/3 "2023-07-19T14:24:30Z")

</div>


