Using Identity Attribute in custom Transform

Hello All,

Iam trying to build a transform that adjust the hiring date according to different time zones.

i have identity attribute called timeoffset that should be used in the below transform as a variable.

my question is how to use timeoffset identity attribute as a variable in the expression field?

{

    "name": "Updated HireDate",
    "type": "dateMath",
    "attributes": {
        "expression": "$identity.getTimeOffset()",
        "roundUp": false,
        "input": {
            "attributes": {
                "input": {
                    "attributes": {
                        "sourceName": "Workday",
                        "attributeName": "HIREDATE"
                    },
                    "type": "accountAttribute"
                },
                "inputFormat": "MM/dd/yyyy",
                "outputFormat": "ISO8601"
            },
            "type": "dateFormat"
        }
    },
    "internal": false
}

Best Regards,
Ahmed Nasr

Can you try this ?

{
  "name": "Updated HireDate",
    "type": "dateMath",
    "attributes": {
        "expression": {
          "input": {
          "attributes": {
            "name": "timeoffset"
          },
          "type": "identityAttribute"
        }
        },
        "roundUp": false,
        "input": {
            "attributes": {
                "input": {
                    "attributes": {
                        "sourceName": "Workday",
                        "attributeName": "HIREDATE"
                    },
                    "type": "accountAttribute"
                },
                "inputFormat": "MM/dd/yyyy",
                "outputFormat": "ISO8601"
            },
            "type": "dateFormat"
        }
    },
    "internal": false
}

unfortunately, still not working with the below error.

sailpoint.api.AttributePromotionException: Applying transform[reference] to attribute[hiredatewithtimezone] failed.

And if you try this ?

{
  "name": "Updated HireDate test",
    "type": "dateMath",
    "attributes": {
        "expression": {
          "type": "identityAttribute",
          "attributes": {
            "name": "timeoffset"
          }
        },
        "roundUp": false,
        "input": {
            "attributes": {
                "input": {
                    "attributes": {
                        "sourceName": "Workday",
                        "attributeName": "HIREDATE"
                    },
                    "type": "accountAttribute"
                },
                "inputFormat": "MM/dd/yyyy",
                "outputFormat": "ISO8601"
            },
            "type": "dateFormat"
        }
    },
    "internal": false
}

@ahmednasr is that work for you ?

yes, thanks alot for the guidance.

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