Hi! I’ve been trying to get the last previous value of an attribute. So, if there was a modification from values “X01” to “X02” and finally “X03”, i always need to read the n-1 previous value, that would be “X02” here.
I tried using this transform, but i always get the first value there was in this attribute, for example X01. Code attached. Any idea? Thanks!
{
"attributes": {
"values": [
"$oldValue",
{
"attributes": {
"sourceName": "Mock-SAIP",
"attributeName": "storeID"
},
"type": "accountAttribute"
}
]
},
"type": "firstValid",
"name": "oldValue firstValid"
}