Mar 23 2022 02:38 PM - edited Mar 28 2022 12:16 AM
When creating Adaptive card with check boxes with "choice",
"submit action" behavior changes on platform where you execute.
On Mac App, it sends only checked(selected) data,
but on iOS app, it sends all data including non-checked checkbox (value of the non-checked checkbox is empty).
[edit 3/28 16:16 JST since the issue was furthuer investigated.]
Is this expected behavior? Is it a bug?
Any workaround to use it on iOS Teams App??
Mar 23 2022 11:14 PM - edited Mar 23 2022 11:14 PM
@t_shi_ma_da -Could you please elaborate your requirement and share the repro steps and adaptive card json, so that we can try it from our end?
Mar 28 2022 12:07 AM
Thanks for the response. Answer follows.
Repro step
1. send AC card on MS Teams. Make sure you can see the values sent to bot from Teams (posting sent values (message.value) to reply for now))
2. submit from PC with single checkbox checked (screenshot 1)
-> returns expected value
3. submit from iOS app with single checkbox checked (screenshot 2)
-> returns unexpected value (unexpected part: contains id from unchecked choiceset)
Sources
Attached AC json & screenshots on each platform(PC, iOS).
Works as expected on PC but adds empty choiceset on iOS. (Assumed PC behavior as expected since it was same on adaptive card designer.)
Raw adaptivecard
{
"type": "AdaptiveCard",
"body": [
{
"type": "Input.ChoiceSet",
"id": "requiredMultiselectId",
"style": "expanded",
"isMultiSelect": true,
"label": "Required Input.ChoiceSet label (expanded, multiselect)",
"errorMessage": "This is a required input",
"choices": [
{
"title": "Option 1",
"value": "1"
}
]
},{
"type": "Input.ChoiceSet",
"id": "requiredMultiselectId_2",
"style": "expanded",
"isMultiSelect": true,
"label": "Required Input.ChoiceSet label (expanded, multiselect)",
"errorMessage": "This is a required input",
"choices": [
{
"title": "Option 2",
"value": "2"
}
]
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Action.Submit"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3"
}
PC submission -> expected output (returns only checked)
[screenshot1]
iOS submission -> Not expected
(returns empty Options 1 id even if option2 is the only checked button. (it's not selected on screenshot since the screenshot was captured on PC))
[screenshot2]
As a workaround, I will add an additional empty value check.
Would this behavior be fixed? Is it a known bug?
Mar 28 2022 12:13 AM
Mar 30 2022 06:02 AM
Oct 19 2022 10:48 PM