cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anthonys123
Helper IV
Helper IV

Turn CSV into Adaptive Card Choices.

User 1 receives a PowerAutomate Card in Teams with a list of items to choose from. They can select any number of items.
User 2 should receive the list of selected items with check boxes that need to be checked before submitting. 

Example 

 

Options for User 1:
[ ] Apple
[ ] Orange
[ ] Pear
[ ] Grape
[ ] Lemon
[ ] Lime


CSV Output:
Apple,Pear,Grape,Lemon


Checklist for User 2:
[ ] Apple
[ ] Pear
[ ] Grape
[ ] Lemon


I've gotten as far as using Split but I don't think this is the right action to use. 

[
"Apple,
"Pear",
"Grape",
"Lemon"
]


I'm putting the Split output into this element in the Adaptive Card.


{
"type": "Input.ChoiceSet",
"choices": @{body('Split')},
"id": "groceries",
"isRequired": true,
"errorMessage": "Please Select an item.",
"label": "Groceries",
"spacing": "Medium"
},

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @anthonys123 ,

 

Maybe you need to construct the correct format for Input.ChoiceSet.

vyujincuimsft_0-1655101788896.png

I have made a test for your reference.

 

variables('choicevariable')
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4",
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Input.ChoiceSet",
            "isMultiSelect":true,
            "placeholder": "",
            "id": "groceries",
            "isRequired": true,
            "label": "Groceries",
            "spacing": "Medium",
            "choices": 
            @{variables('choicevariable')}
        }
    ],
    "actions": [
        {
           "type": "Action.Submit",
           "title": "Submit2",
           "id": "btnSubmit2"
        }
    ]
}

 

vyujincuimsft_1-1655102044722.png

vyujincuimsft_2-1655102178010.png

Result Screenshot:

vyujincuimsft_3-1655102362083.png

 

 

Best Regards,
Charlie Choi

View solution in original post

2 REPLIES 2
v-yujincui-msft
Community Support
Community Support

Hi @anthonys123 ,

 

Maybe you need to construct the correct format for Input.ChoiceSet.

vyujincuimsft_0-1655101788896.png

I have made a test for your reference.

 

variables('choicevariable')
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4",
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Input.ChoiceSet",
            "isMultiSelect":true,
            "placeholder": "",
            "id": "groceries",
            "isRequired": true,
            "label": "Groceries",
            "spacing": "Medium",
            "choices": 
            @{variables('choicevariable')}
        }
    ],
    "actions": [
        {
           "type": "Action.Submit",
           "title": "Submit2",
           "id": "btnSubmit2"
        }
    ]
}

 

vyujincuimsft_1-1655102044722.png

vyujincuimsft_2-1655102178010.png

Result Screenshot:

vyujincuimsft_3-1655102362083.png

 

 

Best Regards,
Charlie Choi

That'll do it!! I can't thank you enough @v-yujincui-msft  

This fills in a lack of education for me and I think it's going to make a big difference in my flows going forward. Cheers!!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (2,127)