Okay @Panos Pateas , I found a workaround. I'll also inquire internally whether this is a bug.
The workaround was taking the "[UserId]" out of the expression, while still using it.
So what I did was, create a string type parameter named "key". I set the default value to [UserId]
.
Then I went to the Set Variable and used @item()[pipeline().parameters.key]
.
{
"name": "bracketInKeyWorkaround",
"properties": {
"activities": [
{
"name": "Lookup1",
"type": "Lookup",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "JsonSource",
"storeSettings": {
"type": "AzureBlobStorageReadSettings",
"recursive": true,
"enablePartitionDiscovery": false
},
"formatSettings": {
"type": "JsonReadSettings"
}
},
"dataset": {
"referenceName": "bracketinKey",
"type": "DatasetReference"
},
"firstRowOnly": false
}
},
{
"name": "ForEach1",
"type": "ForEach",
"dependsOn": [
{
"activity": "Lookup1",
"dependencyConditions": [
"Succeeded"
]
}
],
"userProperties": [],
"typeProperties": {
"items": {
"value": "@activity('Lookup1').output.value[0].rows",
"type": "Expression"
},
"activities": [
{
"name": "Set variable1",
"type": "SetVariable",
"dependsOn": [],
"userProperties": [],
"typeProperties": {
"variableName": "val",
"value": {
"value": "@item()[pipeline().parameters.key]",
"type": "Expression"
}
}
}
]
}
}
],
"parameters": {
"key": {
"type": "string",
"defaultValue": "[UserId]"
}
},
"variables": {
"val": {
"type": "String"
}
},
"annotations": []
}
}
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on or upvote button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
- Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators