cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Archana_Aila
Frequent Visitor

Adaptive card input choiceset unable to take in dynamic array

Hello,

 

I am building a chatbot in PVA which includes bot framework composer. I want to display an adaptive card in the bot from bot framework composer. The adaptive card consists of choiceset which works fine if I give static choices and a static array, but when I try to give a dynamic array which is coming from power automate via PVA, the bot is displaying the empty adaptive card. I have tried  with different versions of adaptive card, still didn't get the output.

Format of the array: 

{

  "title": "b",

  "value": "b"

},

{

  "title": "c",

  "value": "c"

}

Adaptive card:

{
    "type": "AdaptiveCard",
    "version": "1.2",
    "body": [
        {
            "type": "Input.ChoiceSet",
            "id": "selarr",
            "choices":${user.array1},
            "placeholder": "Placeholder text"
        }
    ]
}
 
Can you please help me out with what the problem is?

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @Archana_Aila ,

 

Adaptive card input choiceset should accept dynamic array.

 

Here is a link for your reference.

Solved: Re: Turn CSV into Adaptive Card Choices. - Power Platform Community (microsoft.com)

 

In addition, the array you provided seems to be missing two square brackets.

[
  {
  "title": "b",
  "value": "b"
  },
  {
  "title": "c",
  "value": "c"
  }
]

 

 

Best Regards,

Charlie Choi

View solution in original post

1 REPLY 1
v-yujincui-msft
Community Support
Community Support

Hi @Archana_Aila ,

 

Adaptive card input choiceset should accept dynamic array.

 

Here is a link for your reference.

Solved: Re: Turn CSV into Adaptive Card Choices. - Power Platform Community (microsoft.com)

 

In addition, the array you provided seems to be missing two square brackets.

[
  {
  "title": "b",
  "value": "b"
  },
  {
  "title": "c",
  "value": "c"
  }
]

 

 

Best Regards,

Charlie Choi

Helpful resources

Users online (4,023)