# IdentityNow LCS Transform

**URL:** <https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018>\
**Category:** SHF Discussion and Questions\
**Created:** [November 9, 2021, 10:43pm UTC](https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018 "2021-11-09T22:43:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adyer](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@adyer](https://developer.sailpoint.com/discuss/u/adyer)\
**Post date:** [November 9, 2021, 10:43pm UTC](https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018/1 "2021-11-09T22:43:48Z")

</div>

Hi Sailpoint,

I’m setting up a Lifecycle state in IDN for the users that go on LOA. I created the below transform logic to achieve this. The expected outcome is for the life cycle state to be set to onleave if the condition criteria is met. The issue that I’m having is that when I do the mapping in the identify profile I get the following error: Can someone please advise.

There was an exception while calculating the value for this attribute. com.sailpoint.seaspray.template.TemplateException: Error rendering template: #if($ON\_LEAVE==‘1’)ONLEAVE#{else}active#end

**Transform**

{

“attributes”:{

```
"OnLeave":{

"attributes":{

"attributeName":"ON_LEAVE",

"sourceName": "Workday-Sandbox"

},

"type":"accountAttribute"

},

"value":"#if($ON_LEAVE=='1')onleave#{else}active#end"

},

"name":"Transform - LifeCycleState Mapping",

"type":"static"

}

```

---

<div class="post-metadata">

**Author:** ![christina\_gagnon](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/christina_gagnon/32/9929_2.png) [@christina\_gagnon](https://developer.sailpoint.com/discuss/u/christina_gagnon)\
**Post date:** [November 9, 2021, 11:08pm UTC](https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018/2 "2021-11-09T23:08:47Z")

</div>

@adyer, it appears that you are referencing the wrong variable name in your VTL. Notice in the example below, the variable “workerType” is defined and then referenced in the VTL, not the source attribute name like you are doing in your code.

```auto
{
  "attributes": {
    "workerType": {
      "attributes": {
        "sourceName": "HR Source",
        "attributeName": "empType"
      },
      "type": "accountAttribute"
    },
    "value": "#if($workerType=='Employee')Full-Time#{else}Contingent#end"
  },
  "type": "static",
  "id": "Test Static Transform"
}

```

I believe you need to change the “value” attribute to `#if($OnLeave=='1')onleave#{else}active#end`

Reference this Compass [article](https://community.sailpoint.com/t5/IdentityNow-Wiki/IdentityNow-Transforms-Static/ta-p/180572) for more information.

---

<div class="post-metadata">

**Author:** ![adyer](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@adyer](https://developer.sailpoint.com/discuss/u/adyer)\
**Post date:** [November 10, 2021, 12:45am UTC](https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018/3 "2021-11-10T00:45:51Z")

</div>

Hi Christina,

Thank you, this really helped. I was able to make it work. I kept the value attribute and passed the empty variable in the logic. So the logic looks like this:

{

“attributes”:{

```
"EMP_LOA":{

"attributes":{

"sourceName": "Workday-Sandbox",

"attributeName":"ON_LEAVE"

},

"type":"accountAttribute"

},

"value": "#if($EMP_LOA=='1')ONLEAVE#{else}active#end"

},

"type":"static",

"name":"Test LifeCycleState Mapping"

}
```

---

<div class="post-metadata">

**Author:** ![vijay\_sharma](https://avatars.discourse-cdn.com/v4/letter/v/8edcca/32.png) [@vijay\_sharma](https://developer.sailpoint.com/discuss/u/vijay_sharma)\
**Post date:** [July 8, 2022, 11:24am UTC](https://developer.sailpoint.com/discuss/t/identitynow-lcs-transform/2018/4 "2022-07-08T11:24:27Z")

</div>

> [@christina\_gagnon](#):
>
> VTL

can we retrieve list value from transform inside VTL ?

---

<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/identitynow-lcs-transform/2018/5 "2023-07-19T14:22:15Z")

</div>

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


