# Workflow - action not working properly

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [June 24, 2024, 7:15pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317 "2024-06-24T19:15:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SanchoDavid35](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SanchoDavid35](https://developer.sailpoint.com/discuss/u/SanchoDavid35)\
**Post date:** [June 24, 2024, 7:15pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/1 "2024-06-24T19:15:54Z")

</div>

Hello all ,  
I have been working on Workflows currently , while performing compare string operator it , but it always end ups in false value in either test cases .  
Does anyone have any idea on it ?

---

<div class="post-metadata">

**Author:** ![sisvanthkumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sisvanthkumar/32/13311_2.png) [@sisvanthkumar](https://developer.sailpoint.com/discuss/u/sisvanthkumar)\
**Post date:** [June 24, 2024, 7:50pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/2 "2024-06-24T19:50:53Z")

</div>

Hi @SanchoDavid35 ,  
I have also been facing the similar issue

 ![Screenshot 2024-06-25 at 12.46.12 AM](https://global.discourse-cdn.com/sailpoint/original/2X/7/7c95fe1de386ad25e8498667a4a5506b7989c84f.png)

The operator always results in negative value .  
Kindly refer to this link , they said that they will be raising a ticket for that issue

> [@Workflows - Compare Strings Contains Operator Not working](https://developer.sailpoint.com/discuss/t/workflows-compare-strings-contains-operator-not-working/19138/6):
>
> I was able to replicate the issue. I was able to get a False when I removed the pipe but when I added it back it is showing as true. @colin_mckibben, Is it a known issue?

@colin\_mckibbenbaby any idea on this ?

---

<div class="post-metadata">

**Author:** ![SanchoDavid35](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SanchoDavid35](https://developer.sailpoint.com/discuss/u/SanchoDavid35)\
**Post date:** [June 24, 2024, 7:52pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/3 "2024-06-24T19:52:54Z")

</div>

Will see to it thanks @sisvanthkumar

---

<div class="post-metadata">

**Author:** ![GOKUL\_ANANTH\_M](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gokul_ananth_m/32/14416_2.png) [@GOKUL\_ANANTH\_M](https://developer.sailpoint.com/discuss/u/GOKUL_ANANTH_M)\
**Post date:** [June 24, 2024, 7:55pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/4 "2024-06-24T19:55:01Z")

</div>

Hi @SanchoDavid35 and @sisvanthkumar ,

I am assuming that, you are using “contains” operator inside “compare strings”.

Yes, I too faced the same issue. But it is resolved by replacing it by “Verify Data Type”. As, compare strings is to make comparission between two strings.

 ![Screenshot 2024-06-25 at 1.20.55 AM](https://global.discourse-cdn.com/sailpoint/original/2X/2/204241c0ded54cc4745d5b5db66d1b99745aa2b3.png)

Also, take a look at the below post, you may get an idea:

> [@Workflow : Compare string Operator - Contains](https://developer.sailpoint.com/discuss/t/workflow-compare-string-operator-contains/7659):
>
> Hello Team, I am using workflow action as “Get Account” and the get account is returning the accounts related to specific identity after that I am validating that the user having "demo " account or not, to validate that I am using “Compare String Operator Contains method” (Below are the values for compare string) Value 1 = $.getAccount.accounts[\*].sourceName - [“demo”,“demo1”,“demo2”] operator = contains Value2 demo but the condition always goes to false even if the array contains “demo”. @…

Thanks!

---

<div class="post-metadata">

**Author:** ![sisvanthkumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sisvanthkumar/32/13311_2.png) [@sisvanthkumar](https://developer.sailpoint.com/discuss/u/sisvanthkumar)\
**Post date:** [June 24, 2024, 8:02pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/5 "2024-06-24T20:02:09Z")

</div>

Hi @GOKUL_ANANTH_M ,  
FYI i have been using equals operator within the compare string

 ![Screenshot 2024-06-25 at 1.30.18 AM](https://global.discourse-cdn.com/sailpoint/original/2X/c/ce4a5aaa811e17d67365f365bf08a4dccf9ab49b.png)

I see that the JSON Path value returns an **array** instead of **string**. That may be the problem .  
Correct me if i am wrong .

Thanks!!

---

<div class="post-metadata">

**Author:** ![GOKUL\_ANANTH\_M](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gokul_ananth_m/32/14416_2.png) [@GOKUL\_ANANTH\_M](https://developer.sailpoint.com/discuss/u/GOKUL_ANANTH_M)\
**Post date:** [June 24, 2024, 8:07pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/6 "2024-06-24T20:07:29Z")

</div>

Hi @sisvanthkumar ,

yeah, it may be.

 ![Screenshot 2024-06-25 at 1.18.39 AM](https://global.discourse-cdn.com/sailpoint/original/2X/8/87cbd56b7489541c5d9432d1604e6a1861c45c4b.png)

See the above attachement, I am getting the string value and comparing it with another. This is working fine.

So, I suggest you to check the values which are returned by $.defineVariable.newValue and oldValue.

Thanks!

---

<div class="post-metadata">

**Author:** ![sisvanthkumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sisvanthkumar/32/13311_2.png) [@sisvanthkumar](https://developer.sailpoint.com/discuss/u/sisvanthkumar)\
**Post date:** [June 24, 2024, 8:09pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/7 "2024-06-24T20:09:26Z")

</div>

Sure will check on it @GOKUL_ANANTH_M

---

<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:** [August 23, 2024, 8:09pm UTC](https://developer.sailpoint.com/discuss/t/workflow-action-not-working-properly/68317/8 "2024-08-23T20:09:36Z")

</div>

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