mappingSingleStatus
def mappingSingleStatus = {status, mappingHashArray, nullDefVal = null ->
xxx
}
mappingHashArray is a hash array with two elements: Status and MappedStatus. When this function iterates these elements, mappingHash.MappedStatus is returned if the mappingHash value meets the following condition:
mappingHash.Status == status
Example
"svmx_status": "mappingSingleStatus(SVMXC__Order_Status__c, [
[\"Status\": \"New\", \"MappedStatus\":\"New\"],
[\"Status\": \"Assigned\",\"MappedStatus\":\"Dispatched\"]], \"default status\")"
Sample Transforms
Original Fields
Transformed Fields
Name
Value
Name
Value
SVMXC__Order_Status__c
Assigned
svmx_status
Dispatched
Does not meet condition
Default value specified in function
* 
If SVMXC__Order_Status__c does not meet the condition specified in mappingSingleStatus, the returned value of svmx_status is the default status value specified in the function.
For more information:
Was this helpful?