# LCS Transform not calculating correct value

**URL:** <https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186>\
**Category:** SHF Discussion and Questions\
**Created:** [February 28, 2022, 3:56pm UTC](https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186 "2022-02-28T15:56:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahak14](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@Mahak14](https://developer.sailpoint.com/discuss/u/Mahak14)\
**Post date:** [February 28, 2022, 3:56pm UTC](https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186/1 "2022-02-28T15:56:09Z")

</div>

Hi Sailpoint,

We are trying to configure a separate Lifecycle State for contractors. The Lifecycle state is taking the value from the attribute ‘hrStatus’ through the csv feed file. The transform is applied to lifecycle state in the Identity Profile Mapping section as below:

{

```
"attributes": {

    "requiresPeriodicRefresh": "true",

        "cType": {

            "attributes": {

                "values": [

                    {

                        "attributes": {

                            "sourceName": "Powered HR Source",

                            "attributeName": "hrStatus"

                        },

                        "type": "identityAttribute"

                    },

                    "null"

                ]

            },

            "type": "firstValid"

        },

        "value": "#if($cType==\"contractor\")contractor#{else}active#end"

    },

    "type": "static",

    "name": "Test_Static_Transform_with_firstValid"

}

```

The tranform does not evaluate the value and gives ‘active’ value only irrespective of active or contractor being passed through hrStatus attribute.  
Any suggestions would be helpful.

---

<div class="post-metadata">

**Author:** ![cassidiopia](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/cassidiopia/32/13198_2.png) [@cassidiopia](https://developer.sailpoint.com/discuss/u/cassidiopia)\
**Post date:** [February 28, 2022, 5:18pm UTC](https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186/2 "2022-02-28T17:18:19Z")

</div>

@Mahak14

Your syntax of the value statement seems wrong.

“value”: “#if($cType== ‘contractor’)contractor#{else}active#end”

This format has always worked for me. No need to escape the quotes, just use single quotations. I believe SailPoint documentation has it this way also.

---

<div class="post-metadata">

**Author:** ![Sushantmrj](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Sushantmrj](https://developer.sailpoint.com/discuss/u/Sushantmrj)\
**Post date:** [February 28, 2022, 5:26pm UTC](https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186/3 "2022-02-28T17:26:13Z")

</div>

Hi @Mahak14,

Please, try changing the type from the “identityAttribute” to the “accountAttribute”.

Thanks,  
Sushant

---

<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:22pm UTC](https://developer.sailpoint.com/discuss/t/lcs-transform-not-calculating-correct-value/3186/4 "2023-07-19T14:22:40Z")

</div>

Closed on July 19, 2023, 2:22pm UTC


