sp-dev-fx-webparts icon indicating copy to clipboard operation
sp-dev-fx-webparts copied to clipboard

react-adaptivecards - Unable bind sharepoint doc list data. Works in Adaptive Cards designer with JSON from SharePoint but not on SPFX

Open gretchunkim opened this issue 2 years ago • 1 comments

Disclaimer

Yes

Sample

react-adaptivecards Host

Author(s)

@paulschaeflein

Question

What causes Adaptive Cards Designer to work but not in the actual SPFX Adaptive Cards Host?

Using SharePoint document view (Simple, one item only for simplicity) to render data in Adaptive Cards Designer in Sample Data Editor section.

Following the instruction, get JSON to paste into the Sample Data Editor and populated the card template. Data bound to dynamic data as instructed. The Adaptive Card Designer is rendering the result as expected but not in the actual environment where hte Adaptive Card Host is rendered in SharePoint page (modern, SPO).

AdaptiveCardSP AdaptiveCardHost AdaptiveCardHost

gretchunkim avatar May 23 '22 20:05 gretchunkim

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar May 23 '22 20:05 ghost

This issue has been marked as stale due to no progress in over 90 days. If you are still experiencing this issue, please provide additional information so we can help you resolve it.

github-actions[bot] avatar Sep 05 '22 04:09 github-actions[bot]

Closing this issue due to lack of activity. If you are still encountering this issue, please do not hesitate to open a new issue. Make sure to follow the guidance on how to create good issues to increase your chances of getting the help you deserve.

github-actions[bot] avatar Sep 12 '22 04:09 github-actions[bot]

I found out now why the data binding isn't working.

Adaptive Card data binding changed from {$root} to ${root}. In addition, this won't work in SharePoint List for some reason.

As of writing this comment, in SharePoint list as data source/binding, use ${$root} instead and ${...}

gretchunkim avatar May 05 '23 12:05 gretchunkim