Skip to main content

Notifications

Copilot Studio - General
Unanswered

Adaptive Cards Input Date Just Month and Year Multiple Choice Variables

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()}
  • deceparis Profile Picture
    deceparis 46 on at
    Re: Adaptive Cards Input Date Just Month and Year Multiple Choice Variables

    @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. 🙂 

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,030

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,085

Leaderboard