mappingStatus
def mappingStatus = {statusOne, statusTwo, mappingHashArray, nullDefVal = null ->
xxx
}
mappingHashArray is a hash array with three elements: StatusOne, StatusTwo and MappedStatus. When this function iterates these elements, returns mappingHash.MappedStatus if the mappingHash value meets the following condition:
!((statusConditionOne == null && statusConditionTwo == null) || (statusConditionOne != null && !(statusConditionOne.equals(statusOne))) || (statusConditionTwo != null && !(statusConditionTwo.equals(statusTwo))))
Example
"svmx_status": "mappingStatus(SVMXC__Dispatch_Status__c, SVMXC__Order_Status__c,
[
[\"StatusOne\": \"New\",\"StatusTwo\":null, \"MappedStatus\":\"New\"],
[\"StatusOne\":\"Assigned\",\"StatusTwo\":\"Open\", \"MappedStatus\":\"Dispatched\"],
[\"StatusOne\": \"Assigned\",\"StatusTwo\":\"Closed\", \"MappedStatus\":\"Closed\"]
],
\"default status\")"
Sample Transforms
Original Fields
Transformed Fields
Name
Value
Name
Value
SVMXC__Dispatch_Status__c
Assigned
svmx_status
Dispatched
SVMXC__Order_Status__c
Open
* 
If SVMXC__Dispatch_Status__c and SVMXC__Order_Status__c do not meet the condition specified in mappingStatus, the returned value of svmx_status is the default status value specified in nullDefVal.
For more information:
Was this helpful?