Forum Discussion
Inputs not passing through json in channel
So this has been working for a while but has suddenly stopped working. It works on mobile and in a direct message with the bot but the same action in a channel and none of the inputs are passed through the json to the code behind.
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Execute",
"title": "Refresh",
"verb": "refresh",
"data": {
"AssignedUserName": "${$root.AssignedUserName}",
"CC": "${$root.CC}",
"CloseDate": "${$root.CloseDate}",
"Description": "${$root.Description}",
"From": "${$root.From}",
"ID": "${$root.ID}",
"LastUpdated": "${$root.LastUpdated}",
"Notified": "${$root.Notified}",
"OpenDate": "${$root.OpenDate}",
"Priority": "${$root.Priority}",
"Reference": "${$root.Reference}",
"StatusName": "${$root.StatusName}",
"Subject": "${$root.Subject}",
"TimeTaken": "${$root.TimeTaken}"
},
"fallback": "Action.Submit"
}
]
}
],
"width": "stretch"
},
{
"type": "Column",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.OpenUrl",
"title": "Open in Outlook",
"url": "http://outlookredirect/${$root.Reference}"
}
]
}
],
"width": "stretch"
}
],
"style": "emphasis",
"bleed": true
},
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "${$root.Subject}",
"wrap": true
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "${$root.From}",
"wrap": true
},
{
"type": "TextBlock",
"spacing": "None",
"text": "${$root.OpenDate}",
"isSubtle": true,
"wrap": true
}
],
"width": "stretch"
}
]
},
{
"type": "FactSet",
"facts": [
{
"title": "Status:",
"value": "${$root.StatusName}"
},
{
"title": "Assigned to:",
"value": "${$root.AssignedUserName}"
},
{
"title": "User needs it done by:",
"value": "${$root.PriorityName}"
},
{
"title": "IT can do it by:",
"value": "${$root.ITPriorityName}"
},
{
"title": "Tags:",
"value": "${$root.Tags}"
}
]
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "Edit",
"card": {
"type": "AdaptiveCard",
"body": [
{
"id": "Status",
"label": "Status:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Created",
"value": "1"
},
{
"title": "Acknowledged",
"value": "2"
},
{
"title": "Working On",
"value": "4"
},
{
"title": "Delayed",
"value": "8"
},
{
"title": "PassedOn",
"value": "16"
},
{
"title": "Completed",
"value": "32"
},
{
"title": "Rejected",
"value": "64"
},
{
"title": "Awaiting further details",
"value": "128"
},
{
"title": "On Hold",
"value": "256"
},
{
"title": "Awaiting Sign Off",
"value": "512"
}
],
"value": "${$root.Status}"
},
{
"id": "AssignedUserID",
"label": "Assign a user:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "TP 🥦",
"value": "81"
},
{
"title": "MR :camera:",
"value": "18"
},
{
"title": "MP :poultry_leg:",
"value": "57"
},
{
"title": "BR 🧛:rat:",
"value": "78"
}
],
"value": "${$root.AssignedUserID}"
},
{
"id": "UserPriority",
"label": "User wants this done by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.UserPriority}"
},
{
"id": "ITPriority",
"label": "IT can do this by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.ITPriority}"
},
{
"id": "CardTag",
"label": "Add a Tag:",
"type": "Input.ChoiceSet",
"choices": "${$root.DBTags}",
"value": "${$root.CardTag}"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Save",
"verb": "save",
"data": {
"AssignedUserName": "${$root.AssignedUserName}",
"CC": "${$root.CC}",
"CloseDate": "${$root.CloseDate}",
"Description": "${$root.Description}",
"From": "${$root.From}",
"ID": "${$root.ID}",
"LastUpdated": "${$root.LastUpdated}",
"Notified": "${$root.Notified}",
"OpenDate": "${$root.OpenDate}",
"Priority": "${$root.Priority}",
"Reference": "${$root.Reference}",
"StatusName": "${$root.StatusName}",
"Subject": "${$root.Subject}",
"TimeTaken": "${$root.TimeTaken}"
},
"fallback": "Action.Submit"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Completed",
"card": {
"type": "AdaptiveCard",
"body": [
{
"id": "StatusComplete",
"label": "Status:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Created",
"value": "1"
},
{
"title": "Acknowledged",
"value": "2"
},
{
"title": "Working On",
"value": "4"
},
{
"title": "Delayed",
"value": "8"
},
{
"title": "PassedOn",
"value": "16"
},
{
"title": "Completed",
"value": "32"
},
{
"title": "Rejected",
"value": "64"
},
{
"title": "Awaiting further details",
"value": "128"
},
{
"title": "On Hold",
"value": "256"
},
{
"title": "Awaiting Sign Off",
"value": "512"
}
],
"value": "${$root.Status}"
},
{
"id": "AssignedUserIDComplete",
"label": "Assign a user:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "TP 🥦",
"value": "81"
},
{
"title": "MR :camera:",
"value": "18"
},
{
"title": "MP :poultry_leg:",
"value": "57"
},
{
"title": "BR 🧛:rat:",
"value": "78"
}
],
"value": "${$root.AssignedUserID}"
},
{
"id": "UserPriorityComplete",
"label": "User wants this done by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.UserPriority}"
},
{
"id": "ITPriorityComplete",
"label": "IT can do this by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.ITPriority}"
},
{
"id": "CardTagComplete",
"label": "Add a Tag:",
"type": "Input.ChoiceSet",
"choices": "${$root.DBTags}",
"value": "${$root.CardTag}"
},
{
"type": "Input.Number",
"style": "text",
"id": "TimeTaken",
"label": "Time Taken (in minutes):",
"errorMessage": "Number is required"
},
{
"type": "Input.Text",
"style": "text",
"id": "WikiLink",
"label": "Wiki Link:",
"errorMessage": "Text is required"
},
{
"type": "Input.Text",
"style": "text",
"id": "ExecutedSQL",
"label": "Executed SQL:",
"errorMessage": "Text is required"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Save",
"verb": "complete",
"data": {
"AssignedUserName": "${$root.AssignedUserName}",
"CC": "${$root.CC}",
"CloseDate": "${$root.CloseDate}",
"Description": "${$root.Description}",
"From": "${$root.From}",
"ID": "${$root.ID}",
"LastUpdated": "${$root.LastUpdated}",
"Notified": "${$root.Notified}",
"OpenDate": "${$root.OpenDate}",
"Priority": "${$root.Priority}",
"Reference": "${$root.Reference}",
"StatusName": "${$root.StatusName}",
"Subject": "${$root.Subject}",
"TimeTaken": "${$root.TimeTaken}"
},
"fallback": "Action.Submit"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Reject",
"card": {
"type": "AdaptiveCard",
"body": [
{
"id": "StatusReject",
"label": "Status:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Created",
"value": "1"
},
{
"title": "Acknowledged",
"value": "2"
},
{
"title": "Working On",
"value": "4"
},
{
"title": "Delayed",
"value": "8"
},
{
"title": "PassedOn",
"value": "16"
},
{
"title": "Completed",
"value": "32"
},
{
"title": "Rejected",
"value": "64"
},
{
"title": "Awaiting further details",
"value": "128"
},
{
"title": "On Hold",
"value": "256"
},
{
"title": "Awaiting Sign Off",
"value": "512"
}
],
"value": "${$root.Status}"
},
{
"id": "AssignedUserIDReject",
"label": "Assign a user:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "TP 🥦",
"value": "81"
},
{
"title": "MR :camera:",
"value": "18"
},
{
"title": "MP :poultry_leg:",
"value": "57"
},
{
"title": "BR 🧛:rat:",
"value": "78"
}
],
"value": "${$root.AssignedUserID}"
},
{
"id": "UserPriorityReject",
"label": "User wants this done by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.UserPriority}"
},
{
"id": "ITPriorityReject",
"label": "IT can do this by:",
"type": "Input.ChoiceSet",
"choices": [
{
"title": "Unset",
"value": "0"
},
{
"title": "End of Week",
"value": "1"
},
{
"title": "Three Days",
"value": "2"
},
{
"title": "Afternoon",
"value": "3"
},
{
"title": "ASAP",
"value": "4"
},
{
"title": "Week",
"value": "5"
},
{
"title": "Two Weeks",
"value": "6"
},
{
"title": "Three Weeks",
"value": "7"
},
{
"title": "One Month",
"value": "8"
},
{
"title": "Six Months",
"value": "9"
}
],
"value": "${$root.ITPriority}"
},
{
"id": "CardTagReject",
"label": "Add a Tag:",
"type": "Input.ChoiceSet",
"choices": "${$root.DBTags}",
"value": "${$root.CardTag}"
},
{
"type": "Input.Text",
"style": "text",
"id": "RejectionReasoning",
"label": "Rejection Reasoning:",
"errorMessage": "Text is required"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Save",
"verb": "reject",
"data": {
"AssignedUserName": "${$root.AssignedUserName}",
"CC": "${$root.CC}",
"CloseDate": "${$root.CloseDate}",
"Description": "${$root.Description}",
"From": "${$root.From}",
"ID": "${$root.ID}",
"LastUpdated": "${$root.LastUpdated}",
"Notified": "${$root.Notified}",
"OpenDate": "${$root.OpenDate}",
"Priority": "${$root.Priority}",
"Reference": "${$root.Reference}",
"StatusName": "${$root.StatusName}",
"Subject": "${$root.Subject}",
"TimeTaken": "${$root.TimeTaken}"
},
"fallback": "Action.Submit"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Add Comment",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.Text",
"style": "text",
"id": "Comment",
"errorMessage": "Text is required"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Add Comment",
"verb": "addcomment",
"data": {
"AssignedUserName": "${$root.AssignedUserName}",
"CC": "${$root.CC}",
"CloseDate": "${$root.CloseDate}",
"Description": "${$root.Description}",
"From": "${$root.From}",
"ID": "${$root.ID}",
"LastUpdated": "${$root.LastUpdated}",
"Notified": "${$root.Notified}",
"OpenDate": "${$root.OpenDate}",
"Priority": "${$root.Priority}",
"Reference": "${$root.Reference}",
"StatusName": "${$root.StatusName}",
"Subject": "${$root.Subject}",
"TimeTaken": "${$root.TimeTaken}",
"Comment": "${$root.Comment}"
},
"fallback": "Action.Submit"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4"
}
- mattphillipsCopper Contributor
Some screenshots to go along with the above.
This is the data coming through via a direct message with the bot.
This is the same function but via a channel
As you can see, the Status, Assigned User ID, user priority and it priority are not in the channel version.
- mattphillipsCopper ContributorAny update on this? Or anywhere that I can submit a bug report for?
- mattphillipsCopper Contributor
- Prasad_Das-MSFTMicrosoft
mattphillips - There is a bug raised for similar issue in this thread. We will inform you once we get any further update from engineering team. Thanks!
- Prasad_Das-MSFTMicrosoft
mattphillips - This issue is fixed now. Adaptive card in Ms Teams now returns input field data using Action.Execute
"value": { "action": { "type": "Action.Execute", "id": "execute", "title": "Execute", "data": { "action": "execute", "someText": "qwerty" }, "verb": "execute" }, "trigger": "manual" },
Tested in MS Teams desktop (Microsoft Teams Version 1.6.00.20958) and web client.
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.