Discrepancies between using Action.Submit and Action.Execute in Teams bot adaptive cards
Using Action.Submit there is an option to hide the feedback message using:
"msTeams": {
"feedback": {
"hide": true
}
}
With Action.Execute that is not possible.
Using Action.Execute it is possible to return an information or error text message, or adaptive card, as specified here:
{
"statusCode" : 500,
"type": "application/vnd.microsoft.error",
"value": {
"code": "500",
"message": "Error: Simulated error occurred"
}
}
With Action.Submit regardless of the return body, all you can get is the feedback message:
Considering everything, Action.Execute appears to be a better choice but there is a really bad issue with Action.Execute.
Entered screen values are reset to default (previous values) when Action.Execute button is clicked.
Let's imagine an adaptive card form that the user needs to fill in. Clicking on a button with Action.Execute will clear all entered fields to horror the user. Nevertheless the correct values are sent to the bot and server.
Or this example with entering time:
- User is entering time and initial value is 0
- User enters 7 hours
- User clicks on Save (Action.Execute). The entered value of 7 resets to 0
- After the card refresh, the correct time is stored on the server
Overall, both Action.Submit and Action.Execute do not provide complete control over adaptive card behavior in Teams. Ideally, it would be great to have an option to freely send an information message (feedback) to an already existing adaptive card message, and options to control/suppress feedback for both when needed.
Thanks,
Boris