Hi @joyoon00
Static Transform does work as stated by @jesvin90
I suggest to go with lookup transform to calculate prefix based on department code.
If you calculate conditions in if conditions inside value entry in static transform, you will end up changing the conditions or adding more conditions when requirement changes which is not a simple task.
Instead, if you go with lookup transform, you just update the lookup table.
{
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"sourceName": "HR Source",
"attributeName": "departmentCode"
},
"type": "accountAttribute"
},
"table": {
"A": "2",
"B": "3",
"C": "4",
"default": "1"
}
},
"type": "lookup"
},
{
"attributes": {
"sourceName": "HR Source",
"attributeName": "user ID"
},
"type": "accountAttribute"
}
]
},
"type": "concat",
"name": "UID Concat Transform"
}
Or you can use Static Transform as well
{
"attributes": {
"prefix": {
"attributes": {
"input": {
"attributes": {
"sourceName": "HR Source",
"attributeName": "departmentCode"
},
"type": "accountAttribute"
},
"table": {
"A": "2",
"B": "3",
"C": "4",
"default": "1"
}
},
"type": "lookup"
},
"userID": {
"attributes": {
"sourceName": "HR Source",
"attributeName": "user ID"
},
"type": "accountAttribute"
}
"value": "$prefix$userID"
},
"type": "static",
"name": "UID Static Transform"
}
Thanks
Krish