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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,331)