I want to add buttons to an Adaptive Card like so:
"actions": [
{
"$data": "${collection}",
"type": "Action.Submit",
"title": "${prop1}",
"data": {
"value": "${prop2}"
}
}
],
That works fine in https://adaptivecards.io/designer/
But in an .lg in Composer it doesn't.
For this to work:
"$data": "${collection}",
I need to remove the quoutes around ${collection}.
But then there's no way for me to make work the prop1 and prop2 display for each item. When you declare an element with an array in the $data field, then the element should get repeated and then the binded properties would belong to each element of the array. That's not happening either.
I'm starting to think that Composer doesn't support templating and I'd need to replace the values and do a map with the lg syntax.
Short answer: no
Bots need to explicitly "expand" templates by applying data to them with the Adaptive Cards templating library. The Composer source code never mentions Adaptive Cards, and the only mention of Adaptive Cards in the entire Bot Builder .NET SDK is where attachment content is recognized as an Adaptive Card so the correct content type can be applied. Neither Composer nor Bot Builder even have a dependency on the Adaptive Cards SDK, let alone the Adaptive Cards templating library.
Some form of this question has been asked a few times on GitHub already:
You have a few options: