Hi Experts,
There are few users having dash on their workday attribute - workTelephone, where for few users, there is no dash in workTelephone and for few users there is no value on the attribute.
There are three sample input :
1st → +1 (702) 634-7330
2nd → +1 (702) 8234108
3rd → No value.
I want to write a tranform, to see if phone number has dash, then return phone number, if phone number not having dash, then return the reference transform.when there is no value It has to return empty string. Please find the tranform below. I’m getting error on identities who has no value on work Phone attribute.
can anyone help me resolving it.
{
"name": "IH - put dash",
"type": "static",
"attributes": {
"phoneSub": {
"attributes": {
"input": {
"attributes": {
"attributeName": "WORK_TELEPHONE",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
"begin": 12,
"end": 13
},
"type": "substring",
},
"workPhone": {
"attributes": {
"attributeName": "WORK_TELEPHONE",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
"phoneString": {
"attributes": {
"id": "IH - set Dash TEXT"
},
"type": "reference"
},
"value": "#if($phoneSub == '-')$workPhone#{else}$phoneString#end"
},
"internal": false
}
.....................................................
reference transform :
{
"name": "IH - set Dash TEXT"
"attributes": {
"values": [
{
"attributes": {
"input": {
"attributes": {
"attributeName": "WORK_TELEPHONE",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
"begin": 0,
"end": 12
},
"type": "substring"
},
{
"attributes": {
"value": "-"
},
"type": "static"
},
{
"attributes": {
"input": {
"attributes": {
"attributeName": "WORK_TELEPHONE",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
"begin": 12
},
"type": "substring"
}
]
},
"type": "concat",
"internal": false
}