# Help with a transform

**URL:** <https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud\
**Created:** [November 2, 2023, 11:58am UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136 "2023-11-02T11:58:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![swcoleman](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@swcoleman](https://developer.sailpoint.com/discuss/u/swcoleman)\
**Post date:** [November 2, 2023, 11:58am UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/1 "2023-11-02T11:58:58Z")

</div>

I need to create my first transform.

There is an Identity Attribute coming from our HR system; PrimaryWorkAssignmentExistsRel.AssignmentIsSupervisor; that is 0 if the user is not a supervisor and Not 0 if the user is a supervisor. What I want in IdentityNow is N if they are not a supervisor and Y if they are.

Here is my transform that is not working. The Identity Attribute still contains the number. What am i doing wrong?

```auto
    {
        "id": "59f45ebc-45f9-4e20-91f0-efe87f98af7a",
        "name": "PrimaryAssignmentIsSupervisor ",
        "type": "conditional",
        "attributes": {
            "expression": "$PrimaryAssignmentIsSupervisor eq 0",
            "positiveCondition": "$True",
            "negativeCondition": "$False",
            "department": {
                "attributes": {
                    "sourceName": "GHR",
                    "attributeName": "PrimaryAssignmentIsSupervisor"
                },
                "type": "accountAttribute"
            },
            "True": {
                "attributes": {
                    "value": "N"
                },
                "type": "static"
            },
            "False": {
                "attributes": {
                    "value": "Y"
                },
                "type": "static"
            }
        },
        "internal": false
    },

```

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [November 2, 2023, 12:10pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/2 "2023-11-02T12:10:46Z")

</div>

Try this

```auto
{
        "id": "59f45ebc-45f9-4e20-91f0-efe87f98af7a",
        "name": "PrimaryAssignmentIsSupervisor",
        "type": "conditional",
        "attributes": {
            "expression": "$PrimaryAssignmentIsSupervisor eq 0",
            "positiveCondition": "N",
            "negativeCondition": "Y",
            "PrimaryAssignmentIsSupervisor": {
                "attributes": {
                    "sourceName": "GHR",
                    "attributeName": "PrimaryAssignmentIsSupervisor"
                },
                "type": "accountAttribute"
            }
        },
        "internal": false
    }

```

---

<div class="post-metadata">

**Author:** ![swcoleman](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@swcoleman](https://developer.sailpoint.com/discuss/u/swcoleman)\
**Post date:** [November 2, 2023, 12:58pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/3 "2023-11-02T12:58:02Z")

</div>

that worked. Thanks for the assist!

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [November 2, 2023, 1:02pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/4 "2023-11-02T13:02:45Z")

</div>

Glad that it helped, please mark that response as Solution if no other questions/concerns.

---

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 2, 2023, 3:15pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/5 "2023-11-02T15:15:14Z")

</div>

Or just do a table lookup. No need for a conditional transform at all

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [November 2, 2023, 3:32pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/6 "2023-11-02T15:32:46Z")

</div>

Ya of course, you can use a Static transform also. You should choose transform as per your requirements considering future requirements as well.

---

<div class="post-metadata">

**Author:** ![swcoleman](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@swcoleman](https://developer.sailpoint.com/discuss/u/swcoleman)\
**Post date:** [November 2, 2023, 3:52pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/7 "2023-11-02T15:52:39Z")

</div>

What would the table lookup be like?

the value in the HR system could be 0 or any other number. it’s not a 1 to 1 translation.

---

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 2, 2023, 4:06pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/8 "2023-11-02T16:06:44Z")

</div>

“default” : “y”,  
“0”: “n”

That covers all scenarios listed in the problem statement

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [November 2, 2023, 4:26pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/9 "2023-11-02T16:26:10Z")

</div>

Lookup Transform

```auto
{
    "name": "Supervisor lookup Transform",
    "type": "lookup",
    "attributes": {
        "input": {
			"attributes": {
				"sourceName": "GHR",
                "attributeName": "PrimaryAssignmentIsSupervisor"
			},
			"type": "accountAttribute"
		},
        "table": {
            "0": "N",
			"default": "Y"
        }
    },
    "internal": false
}

```

---

<div class="post-metadata">

**Author:** ![KRM7](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/krm7/32/2685_2.png) [@KRM7](https://developer.sailpoint.com/discuss/u/KRM7)\
**Post date:** [November 2, 2023, 4:32pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/10 "2023-11-02T16:32:14Z")

</div>

Static Transform for same requirement

```auto
{
  "attributes": {
    "isSupervisor": {
      "attributes": {
        "sourceName": "GHR",
        "attributeName": "PrimaryAssignmentIsSupervisor"
      },
      "type": "accountAttribute"
    },
    "value": "#if($isSupervisor=='0')Y#{else}N#end"
  },
  "type": "static",
  "name": "Supervisor Static Transform"
}

```

---

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 2, 2023, 4:37pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/11 "2023-11-02T16:37:12Z")

</div>

I always have the preference that if the output is static to use table lookup.  
Value is for pushing out variables.  
Conditional is for binary, but is not scalable if other outputs appear later down the line

That is just me, but whatever works is fine

---

<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:** [January 1, 2024, 4:37pm UTC](https://developer.sailpoint.com/discuss/t/help-with-a-transform/20136/12 "2024-01-01T16:37:29Z")

</div>

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