web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Passing Choices to an ...
Copilot Studio
Suggested Answer

Passing Choices to an adaptive card in Copilot Studio

(0) ShareShare
ReportReport
Posted on by 143

Hi everyone,

 

I am facing an issue while working on Copilot Studio.

 

Scenario :

 

I am trying to retrieve details of people from Office365 users and I am using DisplayName as the searchterm.

As , people might have similar first names. I am making it such that Copilot gives a list of names to choose from.

 

I took the value array that was given by Office365 and using concat() , converted it to a comma separated string.

Like This , 

Concat(Topic.value,DisplayName,",")

It looked as follows

XYZ,PQR,ABC

I have a Power Automate Flow , which takes this as input. and returns a string as below , which I have stored inside a variable "SampleChoiceData"

[{“title”:“DisplayName1”,“value”:“1”},{“title”:“DisplayName2”,“value”:“2”},{“title”:“DisplayName3”,“value”:“3”},{“title”:“DisplayName4”,“value”:“4”},{“title”:“DisplayName5”,“value”:“5”},{“title”:“DisplayName6”,“value”:“6”},{“title”:“DisplayName7”,“value”:“7”},{“title”:“DisplayName8”,“value”:“8”},{“title”:“DisplayName9”,“value”:“9”},{“title”:“DisplayName10”,“value”:“10”}]

Now , I want to insert this into my adaptive card.

#### Adaptive Card JSON #######

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "TextBlock",
      "text": "Please choose an option:",
      "weight": "Bolder",
      "size": "Medium"
    },
    {
      "type": "Input.ChoiceSet",
      "id": "main",
      "isVisible": true,
      "style": "compact",
      "choices": [
            "${SampleChoiceData}"
      ]
    }
  ],
  "actions": [
    {
      "type": "Action.Submit",
      "title": "Submit",
      "data": {
        "action": "submitChoice"
      }
    }
  ]
}

 

But my adaptive card just turns out BLANK.

I am working on this for a few days now , but I am stuck ! , Please help

I have attached a sample of adaptive card as reference , for better understanding of what I am doing,

If any queries , please feel free to reply 

 

 
AdaptiveCard.png
Categories:
I have the same question (0)
  • Suggested answer
    salahsaleh1 Profile Picture
    5 on at
    Hello,
     
    I had similar usecase. I had array of data to be shown in Adaptive Card. 
    To show data in card I used option of Carousel. 

    If you follow below link you can understand how to do it.

    URL: https://learn.microsoft.com/en-us/microsoft-copilot-studio/guidance/adaptive-card-display-carousels



    Regards
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    Pls t​​​​ry the following:
    • Correct Adaptive Card Data Binding: Instead of using "choices": ["${SampleChoiceData}"], bind SampleChoiceData directly as JSON within the adaptive card’s choices array.
    • Dynamic Binding Syntax: Replace ${SampleChoiceData} with a properly formatted array that Power Automate returns, or parse SampleChoiceData in Copilot before embedding it in the card.
    • Validate JSON Format: Ensure SampleChoiceData contains valid JSON objects for the adaptive card to render options correctly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 813

#2
Vish WR Profile Picture

Vish WR 313

#3
Haque Profile Picture

Haque 271

Last 30 days Overall leaderboard