I\'m creating an Order
confirm card where there\'s an entry for every product and q
As a side note to above,was briefly mentioned there but you should really have a look at what Adaptive Cards Templating can do for you.
https://docs.microsoft.com/en-us/adaptive-cards/templating/
Templating is in preview and works pretty much like data-binding data on a card template. You do not have to serialize/de-serialize your data or construct any containers, factsets etc.. the library does that for you.
I've answered each of those questions a few times. I have a feeling you'll run into more, so feel free to search my user for Adaptive Card questions.
For each of your questions, specifically:
UpdateActivityAsync()
(If you can't "Edit" a message, that channel won't support updating a previously-sent Adaptive Card). Teams just needs some additional steps.
OnMessageAsync
.Update to answer 2.1
I believe this is possible. You'd need the Submit action and then also have a Container that contains the ToggleVisibility action (or vice versa). Something like this:
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Container",
"selectAction": {
"type": "Action.ToggleVisibility",
"targetElements": [
"showMe"
]
},
"items": [
{
"type": "TextBlock",
"text": "Click me"
}
]
},
{
"type": "Container",
"id": "showMe",
"items": [
{
"type": "TextBlock",
"text": "New TextBlock"
}
],
"isVisible": false
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"selectAction": {
"type": "Action.Submit",
"data": "ok"
}
}
I haven't tested this in a bot, just played around in the card designer