Hi All,
I'm running a simple pipeline that takes an input variable, adds 1 day to it, and compares it to another variable.
However, the comparison isn't working as I'm expecting it to. Variable boolTest is set to false after the update of the extractDate variable.
Is there a datatype conversion I need to do to make this work as I expect?
{
"name": "Variable Comparison",
"properties": {
"activities": [
{
"name": "Set tempExtractDate",
"type": "SetVariable",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"variableName": "tempExtractDate",
"value": {
"value": "@adddays(variables('extractDate'),1)",
"type": "Expression"
}
}
},
{
"name": "Update extractDate",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Set tempExtractDate",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "extractDate",
"value": {
"value": "@variables('tempExtractDate')",
"type": "Expression"
}
}
},
{
"name": "Update boolTest",
"type": "SetVariable",
"dependsOn": [
{
"activity": "Update extractDate",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"variableName": "boolTest",
"value": {
"value": "@equals(variables('endDate'),variables('extractDate'))",
"type": "Expression"
}
}
}
],
"variables": {
"extractDate": {
"type": "String",
"defaultValue": "2020-05-29T00:00:00Z"
},
"tempExtractDate": {
"type": "String"
},
"endDate": {
"type": "String",
"defaultValue": "2020-05-30T00:00:00Z"
},
"boolTest": {
"type": "Boolean"
}
},
"annotations": []
}
}
Regards,
-rob