I have a topic with variables that I want to display inside an adaptive card within a message node. The adaptive card does not process the ${var1} reference in the textblock element. Is this even possible?
Hello @MattJimison,
This was very helpful. But when I switch to Formula mode from JSON, there are no outputs from the adaptive cards. How to get outputs in Formula mode as well?
i was trying to see how to send the tkt ID back to the user using adaptive card. This video helped me
Here is a video explaining this in detail: https://www.youtube.com/watch?v=5qWIIyyMmxo
@Brian-65 I'd recommend checking out:
https://learn.microsoft.com/en-us/power-virtual-agents/unified-authoring-conversion#upgrading-to-power-virtual-agents-unified-authoring
Yes - you can use the Adaptive Card Designer (https://adaptivecards.io/designer/) to build your card, then copy/paste it into the adaptive card in PVA. Once you switch from JSON to Formula, you'll then be able to inject your own data. I recommend creating a copy of the JSON prior to switching to the Formula, though, because if you try and switch from Formula back to JSON, the entire card will get reset. This will allow you to more easily recover your card should you get into a situation where your Formula is erroring out and you want to start over again.
Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.
Cheers,
Matt
Hi @MattJimison. Thanks for the information. Is this documented anywhere? Also, is it possible to use the adaptive card editor to export the JSON is this format? I have a very large adaptive card.
Hi, @Brian-65.
When you create your adaptive card, you'll want to switch from JSON to Formula in the adaptive card properties, and once you've done that, you can reference topic variables via Topic.VariableName.
Below is a simple example where I'm referencing a UserName variable within the adaptive card:
{
type: "AdaptiveCard",
'$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.5",
body: [
{
type: "TextBlock",
text: Topic.UserName,
wrap: true
}
]
}
Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.
Cheers,
Matt
Romain The Low-Code...
76
Pablo Roldan
61
stampcoin
10