I have the following adaptive card template:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"style": "warning",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "40px",
"items": [
{
"type": "Image",
"url": "data:image/png;base64",
"height": "40px",
"width": "40px",
"separator": true
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "My new test",
"wrap": true,
"size": "Large",
"weight": "Bolder",
"color": "Dark",
"isSubtle": false,
"separator": true,
"horizontalAlignment": "Left",
"spacing": "None",
"fontType": "Default"
},
{
"type": "TextBlock",
"text": "Session: {{ id }}",
"wrap": true,
"spacing": "None",
"horizontalAlignment": "Left",
"fontType": "Default",
"size": "Small",
"weight": "Default",
"color": "Default",
"isSubtle": false
}
]
}
]
}
],
"bleed": true,
"spacing": "Medium",
"horizontalAlignment": "Left",
"height": "stretch",
"minHeight": "1px",
"verticalContentAlignment": "Top",
"rtl": false
},
{
"type": "ColumnSet",
"separator": true,
"spacing": "Medium",
"columns": [
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Code",
"isSubtle": true,
"weight": "Bolder",
"wrap": true
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "Status",
"isSubtle": true,
"weight": "Bolder",
"wrap": true
}
]
}
]
},
{
"type": "ColumnSet",
"$data": "${content}",
"separator": true,
"spacing": "Medium",
"columns": [
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "{{ code }}",
"spacing": "Small",
"wrap": true
}
]
},
{
"type": "Column",
"width": 1,
"items": [
{
"type": "TextBlock",
"text": "{{ status }}",
"spacing": "Small",
"wrap": true
}
]
}
]
}
]
},
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5"
}
]
}
I am passing to it the following data:
{
"id": "eb9a4d4b-5a3b-4eab-84a0-2ef0bc6b264b",
"content": [
{
"code": "p1",
"status": "test_failed"
},
{
"code": "p2",
"status": "released"
},
{
"code": "p3",
"status": "released"
},
{
"code": "p4",
"status": "released"
},
{
"code": "p5",
"status": "released"
}
]
}
Am using python to pass the content to the template, that's why am using {{ }} instead of ${}. the problem am facing is that I can't show the array elements. the result that i can see is the flowing :
My new release test
Session: eb9a4d4b-5a3b-4eab-84a0-2ef0bc6b264b
Code Status
As you can see the session id is parsed correctly, but the issue is not. i changed it to the ${code} and ${status} it shows:
My new release test
Session: eb9a4d4b-5a3b-4eab-84a0-2ef0bc6b264b
Code Status
{code} {status}
But if i set in the adaptive card for the code and the status:
"text": "{{ content[0].code }}"
i got it parsed correctly but only the first element of the content am passing:
My new release test
Session: eb9a4d4b-5a3b-4eab-84a0-2ef0bc6b264b
Code Status
GM_1 failed
could anyone give a hand here ?