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 / Dynamic options in Ada...
Copilot Studio
Unanswered

Dynamic options in Adaptive card based on list variable

(0) ShareShare
ReportReport
Posted on by 92

Hi,

I have a variable called 'options' which a list of options a user has based on his access level.  

Is it possible to create dynamic multi-choice single select options for him as a dynamic adaptive card?

@adilei 🙏

Categories:
I have the same question (0)
  • jscheidl Profile Picture
    8 on at

    Depending on your criteria, you could always build the 'Choices' string for your Input.ChoiceSet element in Copilot Studio and dynamically pass it to the Adaptive Card JSON. Below is a quick example:

     

    • Create a condition that checks the user's access level (I've used a simple 'Full' or 'Partial' access for the example, but feel free to update per your needs).

     

    • Set a string variable ('AC_Choices' here) to emulate the data needed for the "choices" field for the AC element "Input.ChoiceSet"

    jscheidl_0-1715355602382.png

     

    Full Access String:

    [{"title": "Option1", "value": "Option1"}, {"title": "Option2", "value": "Option2"}, {"title": "Option3", "value": "Option3"}]

     

    Partial Access String (with Option 2 removed):

    [{"title": "Option1", "value": "Option1"}, {"title": "Option3", "value": "Option3"}]

     

    • Create an Adaptive Card node. In the properties, select the dropdown so that it shows 'Edit Formula'

    jscheidl_1-1715356094853.png

     

    Your code should look something like this:

    {
    	type: "AdaptiveCard",
    	schema: "http://adaptivecards.io/schemas/adaptive-card.json",
    	version: "1.5",
    	body: [
    	{
    		type: "TextBlock",
    		text: "Options",
    		weight: "bolder",
    		size: "medium",
    		style: "heading",
    		wrap: true
    	},
    	{
    		type: "TextBlock",
    		text: "Please select your options",
    		isSubtle: true,
    		wrap: true
    	},
    	{
    		type: "Container",
    		items:
    		[
    		{
    			type: "Input.ChoiceSet",
    			style: "Expanded",
    			label: "Make your choice",
    			id: "myChoice",
    			choices: Topic.AC_Choices
    		}
    		]
    	}
    	],
    	actions: [
    	{
    		type: "Action.Submit",
    		title: "Submit"
    	}
    	]
    }

     

    Notice we are passing 'Topic.AC_Choices' in the 'choices' field of "Input.ChoiceSet".

     

    Your AC should now show only the choices you have predetermined.

  • Viswav Profile Picture
    92 on at

    Thank you so much for taking the time to explain, Legend. Let me try it out and get back. 

  • Viswav Profile Picture
    92 on at

    I've tried testing it but could not get the adaptive card to display the intended options:

    Viswav_0-1715365921021.png


    I've used the following adaptive card:

    {
        type: "AdaptiveCard",
        version: "1.5",
        body: [
        {
            type: "TextBlock",
            text: "Options",
            weight: "bolder",
            size: "medium",
            style: "heading",
            wrap: true
        },
        {
            type: "TextBlock",
            text: "Please select your options",
            isSubtle: true,
            wrap: true
        },
        {
            type: "Container",
            items:
            [
            {
                type: "Input.ChoiceSet",
                style: "Expanded",
                label: "Make your choice",
                id: "myChoice",
                choices: Topic.ChoiceSet
            }
            ]
        }
        ],
        actions: [
        {
            type: "Action.Submit",
            title: "Submit"
        }
        ]
    }




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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 594

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard