How to Capture and Return Dynamic Table Data in Adaptive Card for Copilot Studio
I have an Adaptive Card JSON where I display employee information and a dynamic list of tasks. The list allows users to edit task details using Input.Text fields. My goal is to capture the updated task list and return it in Copilot Studio, but I'm struggling with defining the correct output schema.
Adaptive card Json -
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "Employee Information",
"weight": "bolder",
"size": "large"
},
{
"type": "TextBlock",
"text": "Employee Name: " & Topic.TaskTable.employeeName,
"separator": true
},
{
"type": "TextBlock",
"text": "Employee ID: " & Topic.TaskTable.employeeID,
"separator": true
},
{
"type": "TextBlock",
"text": "Department: " & Topic.TaskTable.employeeDepartment,
"separator": true
},
{
"type": "TextBlock",
"text": "Tasks",
"weight": "bolder",
"size": "medium",
"separator": true
},
{
"type": "Container",
"items":
ForAll(Topic.TaskTable.employeeTasks,
{
"type": "Input.Text",
"id": taskID,
"label": "Task ID",
"value": taskID
}
)
}
]
}
To capture and return the updated employeeTasks data, I attempted the following output schema in Copilot Studio:
kind: Record
properties:
employeeDepartment: String
employeeID: String
employeeName: String
employeeTasks:
kind: Array
items:
kind: Record
properties:
taskID: String
taskDescription: String
dueDate: String
However, Copilot Studio does not accept array of records as an output variable, leading to errors.
Questions:
How can I correctly define the output schema to return the updated employeeTasks list?
Is there an alternative approach to collect and process dynamic lists in Adaptive Cards for Copilot Studio?
Does Copilot Studio support arrays of records, or is there a workaround to achieve this?
Any insights or solutions would be greatly appreciated!