sp-dev-fx-webparts
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
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).
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
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.
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.
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 ${...}