question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[.NET][Templating] Repeatable items not rendering in Emulator or Web Chat

See original GitHub issue

This renders properly in the adaptive card designer but shows null for values and doesn’t iterate in objects.

Template:

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.2",
    "body": [
        {
            "type": "ColumnSet",
            "separator": true,
            "spacing": "Medium",
            "columns": [
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Product",
                            "spacing": "Small",
                            "weight": "Bolder"
                        },
                        {
                            "type": "TextBlock",
                            "text": "Brand",
                            "spacing": "Small",
                            "weight": "Bolder"
                        },
                        {
                            "type": "TextBlock",
                            "text": "Color",
                            "spacing": "Small",
                            "weight": "Bolder"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "${ProductName}",
                            "spacing": "Small"
                        },
                        {
                            "type": "TextBlock",
                            "text": "${Brand}",
                            "spacing": "Small"
                        },
                        {
                            "type": "TextBlock",
                            "text": "${Color}",
                            "spacing": "Small"
                        }
                    ]
                }
            ],
            "$data": "${$root.LineItems}"
        }
    ]
}

Data Object:

{
  "OrderNumber": "12345",
  "OrderStatus": "Processed",
  "LineItems": [
    {
      "ProductName": "Product Name 1",
      "Brand": "Brand Name 1",
      "Color": "Black"
    },
    {
      "ProductName": "Product Name 2",
      "Brand": "Brand Name 2",
      "Color": "White"
    }
  ]
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
atjohns2commented, Jun 1, 2020

I see now that there is apparently a completely new way of presenting these cards with the templating language. I was using the Virtual Assistant template which has not been updated it appears to work with the newest way of doing adaptive cards.

I will close this issue. Sorry for the confusion.

0reactions
jwoo-msftcommented, Jun 1, 2020

@atjohns2 I don’t know much about bot framework. @dclaux @matthidinger Could you please respond to @atjohns2’s comment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CVE - Search Results - MITRE
The mission of the CVE® Program is to identify, define, and catalog publicly disclosed cybersecurity vulnerabilities.
Read more >
CVE - Search Results - MITRE
The mission of the CVE® Program is to identify, define, and catalog publicly disclosed cybersecurity vulnerabilities.
Read more >
Mad Computer Scientist | IT Professional by day, mad ...
The problem is that Linq to SQL cannot move objects between DataContexts, so if one context was used to lookup the object in...
Read more >
chrisunvicheti.gq
Online chat room without any registration, 75 degree angle triangle, ... Getting max from an array java, G2a code not working, Christmas events...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found