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

Notifications

Announcements

Community site session details

Community site session details

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

Passing Choices to an adaptive card in Copilot Studio

(0) ShareShare
ReportReport
Posted on by 84

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 

 

 
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,990 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard