
Announcements
Hi,
I'm making a flow with adaptive cards that requests the user state what action they took.
2 options are submit buttons and 1 option includes a date picker with comments section.
When I use either post card and wait for response route or post card and 'when someone responds' - both pathways does not show me card data.
I have put an ID name for all the components in the designer so I'm a bit stumped at what I could be missing. At first I thought submit buttons won't record but then it doesn't explain my date picker and text input option not showing either. It's my first time using adaptive cards and I do not have prior JSON experience, I'm learning as I go.
Any advice would be helpful. Here are some videos and threads I read/watched beforehand:
https://youtu.be/2n2G-igEy1Q
Work has been so busy I didn't have a chance to go back to this until recently. A colleague helped me troubleshoot this and we got it so I post the solution here in case anyone else also needs help.
Firstly, this article I was referencing helped greatly: https://www.flowjoe.io/2021/06/01/getting-data-from-adaptive-cards-in-microsoft-teams/
The key point in this article that helped was "If you’re experiencing the data not showing up in the dynamic content you can use: outputs(‘Post_adaptive_card_and_wait_for_a_response’)?[‘body/data/thoughts’] and replace ‘thoughts’ with the id of your element."
This is put into Expressions in a Compose.
This resolved my problem with getting the data for my submissions.
It's important to note that one of my options is choosing a date and entering a comment - both are required - so 'body/data/' would use the id I set in my JSON. But for the action of just pressing a button, I first had to do a test run before my colleague pointed out to me that instead of choosing the id name for the button, I had to choose the actual name of the action instead, that was 'submitActionId' so outputs(‘Post_adaptive_card_and_wait_for_a_response’)?[‘body/data/submitActionId’]
Lastly, I needed to check what option was picked from the adaptive card as the option selected triggered more actions in my flow. For this I used Condition. My colleague once again pointed out we can do 'if submitactionId output is null' logic. I was trying to use length() but that didn't work.