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 / Adaptive Cards Input D...
Copilot Studio
Unanswered

Adaptive Cards Input Date Just Month and Year Multiple Choice Variables

(0) ShareShare
ReportReport
Posted on by 29

How could I make an adaptive card that just ask for Month and Year, Avoiding asking for day like the one below?

 

Regards

 

Update: I managed to publish an Adaptive Card asking for Month and Year. The problem now is that the values are not showing up on PVA. 

Here is my code of the Adaptive Card, I made it with Multichoice options (Two properties, month and year and also previously created on PVA)

I think nothing is wrong with this code, I think the problem is on the dialog. I Attach pictures. After I click ok on the adaptive card the message come without the new variables, they come in blank

rubengzz7_0-1662524531991.pngrubengzz7_1-1662524544627.png

rubengzz7_2-1662524601735.png

 

[import](common.lg)

# adaptivecardchoicesetmonthyear()

- ```

{

    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

    "type": "AdaptiveCard",

    "version": "1.0",

    "body": [

        {

            "type": "TextBlock",

            "text": "Date"

        },

        {

            "type": "Input.ChoiceSet",

            "id" : "month",

            "choices": [

                {

                    "title": "January",

                    "value": "01"

                },

                {

                    "title": "February",

                    "value": "02"

                },

                {

                    "title": "March",

                    "value": "03"

                },

                {

                    "title": "April",

                    "value": "04"

                },

                {

                    "title": "May",

                    "value": "05"

                },

                {

                    "title": "June",

                    "value": "06"

                },

                {

                    "title": "July",

                    "value": "07"

                },

                {

                    "title": "August",

                    "value": "08"

                },

                {

                    "title": "September",

                    "value": "09"

                },

                {

                    "title": "October",

                    "value": "10"

                },

                {

                    "title": "November",

                    "value": "11"

                },

                {

                    "title": "December",

                    "value": "12"

                }

            ],

            "placeholder": "Month"

        },

        {

            "type": "Input.ChoiceSet",

            "id" : "year",

            "choices": [

                {

                    "title": "2018",

                    "value": "2018"

                },

                                {

                    "title": "2019",

                    "value": "2019"

                },

                                {

                    "title": "2020",

                    "value": "2020"

                },

                                {

                    "title": "2021",

                    "value": "2021"

                },

                {

                    "title": "2022",

                    "value": "2022"

                }

            ],

            "placeholder": "Year"

        }

    ],

    "actions": [

        {

            "type": "Action.Submit",

            "title": "OK"

        }

    ]

}

```

# adaptivecardchoicesetmonthyearprompt()

[Activity

    Attachments = ${json(adaptivecardchoicesetmonthyear())}

]

# Ask_Activity_3IFXt5()

- ${adaptivecardchoicesetmonthyearprompt()}

# Ask_Activity_yBdN1n()

- ${adaptivecardchoicesetmonthyearprompt()}
Categories:
I have the same question (0)
  • deceparis Profile Picture
    46 on at

    @rubengzz7 , sorry for the late reply. Have you tried setting a single variable? Can you show how the variable is actually being set (so the property part in BFC). The use-case does not seem very different from mine, but it may also be that the adaptive card doesn't have the correct inputs. I am hardly an expert at this but am willing to give it the ol' college try if you have not yet figured it out. 🙂 

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

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 84 Super User 2025 Season 2

Last 30 days Overall leaderboard