Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array of objects data binding is not working composer Adaptive card, But working in Online Adaptive card designer!! #9723

Open
midhunkalathilapipeople opened this issue Mar 26, 2024 · 4 comments
Labels
Needs-triage A new issue that require triage Type: Bug Something isn't working

Comments

@midhunkalathilapipeople
Copy link

midhunkalathilapipeople commented Mar 26, 2024

I have below Json data that work in online adaptive card designer but the same code is not working in composer, Can anybody help on this?

Composer version: 2.1.3-nightly.364675.1a93f21
OS : Windows
Framework: .NET

Below shared the Json data and AdaptiveCard
jsonData:

`{
"code": "ER-13052",
"expenses": [
{

  "date": "2017-02-21",
  "description": "Air Travel Expense",
  "total": 300,      
  "created_time": "2019-06-19T18:33:12+0800"
},
{
  "date": "2019-06-19",
  "description": "Auto Mobile Expense",
  "total": 100,
  "created_time": "2019-06-19T18:33:12+0800"
},
{
  "date": "2019-06-21",
  "description": "Excess Baggage Cost",
  "total": 50.38,
  "created_time": "2019-06-21T18:33:12+0800"
}

]
}`

AdaptiveCard:

{ "type": "AdaptiveCard", "body": [ { "type": "Container", "spacing": "Large", "style": "emphasis", "items": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "weight": "Bolder", "text": "DATE", "wrap": true } ], "width": "auto" }, { "type": "Column", "spacing": "Large", "items": [ { "type": "TextBlock", "weight": "Bolder", "text": "CATEGORY", "wrap": true } ], "width": "stretch" }, { "type": "Column", "items": [ { "type": "TextBlock", "weight": "Bolder", "text": "AMOUNT", "wrap": true } ], "width": "auto" } ] } ], "bleed": true }, { "$data": "${expenses}", "type": "Container", "items": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "items": [ { "type": "TextBlock", "text": "${formatDateTime(created_time, 'MM-dd')}", "wrap": true } ], "width": "auto" }, { "type": "Column", "spacing": "Medium", "items": [ { "type": "TextBlock", "text": "${description}", "wrap": true } ], "width": "stretch" }, { "type": "Column", "items": [ { "type": "TextBlock", "text": "$${formatNumber(total, 2)}", "wrap": true } ], "width": "auto" } ] } ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.5", "fallbackText": "This card requires Adaptive Cards v1.5 support to be rendered properly." }

Working screenshot on Online :

image

Error :
The card is not showing in Emulator/Web Chat
image

Please suggest what changes will solve this.

Thanks in advance!!

@midhunkalathilapipeople midhunkalathilapipeople added Needs-triage A new issue that require triage Type: Bug Something isn't working labels Mar 26, 2024
@OEvgeny
Copy link
Collaborator

OEvgeny commented Mar 26, 2024

As far as I know neither WebChat nor Composer don't support adaptive cards v. 1.5.

The supported version is v. 1.3.

@midhunkalathilapipeople
Copy link
Author

Thank you for the quick support.

Getting same error even we tried with version 1.3.

Are they support array operation in composer ? I searched for some sample bot with the same , Didn't found.

@OEvgeny
Copy link
Collaborator

OEvgeny commented Mar 27, 2024

I'm not seeing the support mentioned either. Does the card look the same (missing) after the version downgrade?

@midhunkalathilapipeople
Copy link
Author

Hi @OEvgeny
Yes. Looks same , Doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-triage A new issue that require triage Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants