bsayya01
(Baji Sayyad)
November 24, 2025, 4:58pm
1
{
"id": "sdfgsdrge-ed2c-asfds-9cf2-dfsdf",
"name": "Update OEDStopDate",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"getEmployeeType": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "OU",
"sourceName": "Workday"
},
"type": "accountAttribute"
},
{
"attributes": {
"value": "NOT GIVEN"
},
"type": "static"
}
]
},
"type": "firstValid"
},
"contractExpirationDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"endDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "LAST_DAY_OF_WORK",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"value": "${getEmployeeType == 'Employee' ? endDate : (getEmployeeType == 'Contingent Worker' ? contractExpirationDate : '')}"
},
"internal": false
}
We have created this transform to get the end date on identity but identity refresh is coming as fail for this transform as null value being returned for contractors as well
Could you please check and update me the corrected version?
sup3rmark
(Mark Corsillo)
November 24, 2025, 5:30pm
2
You need to wrap the LAST_DAY_OF_WORK and CONTRACT_END_DATE values in firstValid transforms with bogus dates far in the future, and apply logic to only set the value if the date is not the bogus date.
Hi @bsayya01 ,
Welcome to the developer community.
The problem is related to null value handling and Velocity syntax in your static transform.
Null values aren’t protected - When CONTRACT_END_DATE or LAST_DAY_OF_WORK are null in Workday, the dateFormat transform returns null, which causes the Velocity template engine to throw an error.
Invalid Velocity syntax - You’re using JavaScript-style ternary operators instead of Velocity Template Language syntax.
Here’s a sample transform for you to model/try:
{
"id": "",
"name": "Update OEDStopDate",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"getEmployeeType": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"attributeName": "OU",
"sourceName": "Workday"
}
},
{
"type": "static",
"attributes": {
"value": "NOT GIVEN"
}
}
]
}
},
"contractExpirationDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": "null"
}
}
]
}
},
"endDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "LAST_DAY_OF_WORK",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": "null"
}
}
]
}
},
"value": "#if($getEmployeeType == 'Employee' && $endDate != 'null')$endDate#elseif($getEmployeeType == 'Contingent Worker' && $contractExpirationDate != 'null')$contractExpirationDate#end"
},
"internal": false
}
Reference : Static Transform Documentation
Hope this helps!
schattopadhy
(SHANTANU CHATTOPADHYAY)
November 25, 2025, 6:43am
4
TheOneAMSheriff:
city template engine to throw an error.
Invalid Velocity syntax - You’re using Jav
@bsayya01 you can use static value to overcome null issues as mentioned
new 40.txt (1.1 KB)
vsekar7
(Vengatesan Sekar)
November 25, 2025, 7:31am
5
Hi @TheOneAMSheriff ,
I am getting below error for the below transform code:
Error Message:
There was an exception while calculating the value for this attribute. Error during transformation for attribute: oedStopDate (Transform ID: Update OEDStopDate) Cause: Error rendering template: #if ($getEmployeeType == ‘Employee’ && $endDate != ‘null’)$endDate#elseif($getEmployeeType == ‘Contingent Worker’ && $contractExpirationDate != ‘null’)$contractExpirationDate#end
Transform Code:
“name”: “Update OEDStopDate”,
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"getEmployeeType": {
"type": "firstValid",
"attributes": {
"values": \[
{
"attributes": {
"attributeName": "OU",
"sourceName": "Workday"
},
"type": "accountAttribute"
}
\]
}
},
"contractExpirationDate": {
"type": "firstValid",
"attributes": {
"values": \[
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": "null"
}
}
\]
}
},
"endDate": {
"type": "firstValid",
"attributes": {
"values": \[
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "LAST_DAY_OF_WORK",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": "null"
}
}
\]
}
},
"value": "#if($getEmployeeType == 'Employee' && $endDate != 'null')$endDate#elseif($getEmployeeType == 'Contingent Worker' && $contractExpirationDate != 'null')$contractExpirationDate#end"
},
"internal": **false**
Hi @bsayya01 , @vsekar7 ,
Seems like you accidently removed the fallback static value: “NOT GIVEN” for variable: getEmployeeType . Also direct null check might not be supported by Velocity; I have updated the transform considering both. Please try to model the below transform which could resolve the issue: -
{
"name": "Update OEDStopDate",
"type": "static",
"attributes": {
"requiresPeriodicRefresh": "true",
"getEmployeeType": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "accountAttribute",
"attributes": {
"attributeName": "OU",
"sourceName": "Workday"
}
},
{
"type": "static",
"attributes": {
"value": "UNKNOWN"
}
}
]
}
},
"contractExpirationDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": ""
}
}
]
}
},
"endDate": {
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "LAST_DAY_OF_WORK",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
}
},
{
"type": "static",
"attributes": {
"value": ""
}
}
]
}
},
"value": "#if($getEmployeeType == 'Employee')$endDate#elseif($getEmployeeType == 'Contingent Worker')$contractExpirationDate#end"
},
"internal": false
}
I hope this helps
vsekar7
(Vengatesan Sekar)
November 25, 2025, 1:43pm
7
Hi @TheOneAMSheriff .
The below transform code has been passed as success:
“type”: “static”,
"attributes": {
"requiresPeriodicRefresh": "true",
"getEmployeeType": {
"attributes": {
"values": \[
{
"attributes": {
"attributeName": "OU__c",
"sourceName": "Workday"
},
"type": "accountAttribute"
}
\]
},
"type": "firstValid"
},
"contractExpirationDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "CONTRACT_END_DATE",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"endDate": {
"attributes": {
"input": {
"type": "accountAttribute",
"attributes": {
"attributeName": "LAST_DAY_OF_WORK",
"sourceName": "Workday"
}
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"value": "#{if}($getEmployeeType == 'Employee')$endDate#{elseif}($getEmployeeType == 'Contingent Worker')$contractExpirationDate#{end}"
},
"internal": **false**
Thank you for the assistance
1 Like
vsekar7
(Vengatesan Sekar)
November 25, 2025, 4:31pm
8
Hi @TheOneAMSheriff ,
For the above transform, in the identity profile preview, the source attribute is coming as below instead of Last_day_of_work for Employees.
Could you please check and assist us ?
Identity Attribute
OED Stop Date
Identity Value
--
Preview Value
--
Source
Workday
Source Attribute
CONTRACT_END_DATE