1
votes

I'm developing a program to extend some functionality from our helpdesk software to Microsoft Teams, using a connector.

This card will have a dropdown-menu where you can choose which person to assign the case to.

The card is successfully posted, but when i click the dropdown menu in the card nothing happens. I know the display-value pair is correctly set, because if I set "isMultiSelect" to true it displays my choices (but this is not going to be multi select, so I cant have it).

Here is the code example from Microsoft I'm using, look at the "Example connector message" - and below is my JSON. I believe it is correct according to the example.

JSON:

{
"summary":  "my summary",
"title":  "Main title",
"sections":  [
                 {
                     "activitySubtitle":  "ActivitySubtitle",
                     "activityImage":  "http://www.ironmagazine.com/wp-content/uploads/arnold-schwarzenegger-420x327.jpg",
                     "activityTitle":  "ActivityTitle",
                     "activityText":  "ActivityText"
                 },
                 {
                     "facts":  [
                                   {
                                       "value":  "Facts1 - value",
                                       "name":  "Facts1 - name"
                                   },
                                   {
                                       "value":  "Facts2 - value",
                                       "name":  "Facts2 - name"
                                   }
                               ],
                     "title":  "See more - Tittel "
                 }
             ],
"potentialAction":  [
                        {
                            "actions":  [
                                            {
                                                "name":  "Add comment",
                                                "target":  "http://www.vg.no",
                                                "@type":  "HttpPost"
                                            }
                                        ],
                            "inputs":  [
                                           {
                                               "target":  "https://www.vg.no",
                                               "id":  "Comment",
                                               "@type":  "TextInput"
                                           }
                                       ],
                            "name":  "Add comment",
                            "@type":  "Actioncard"
                        },
                        {
                            "actions":  [
                                            {
                                                "name":  "Save",
                                                "target":  "http://www.vg.no",
                                                "@type":  "HttpPost"
                                            }
                                        ],
                            "inputs":  [
                                           {
                                               "title":  "enter a due date",
                                               "id":  "dueDate",
                                               "@type":  "DateInput"
                                           }
                                       ],
                            "name":  "Set due date",
                            "@type":  "Actioncard"
                        },
                        {
                            "actions":  [
                                            {
                                                "name":  "Save",
                                                "target":  "http://www.vg.no",
                                                "@type":  "HttpPost"
                                            }
                                        ],
                            "inputs":  [
                                           {
                                               "title":  "Assign case to..",
                                               "isMultiSelect":  "false",
                                               "choices":  [
                                                               {
                                                                   "value":  "1",
                                                                   "display":  "Person1"
                                                               },
                                                               {
                                                                   "value":  "2",
                                                                   "display":  "Person2"
                                                               },
                                                               {
                                                                   "value":  "3",
                                                                   "display":  "Person3"
                                                               },
                                                               {
                                                                   "value":  "4",
                                                                   "display":  "Person4"
                                                               }
                                                           ],
                                               "id":  "list",
                                               "@type":  "MultichoiceInput"
                                           }
                                       ],
                            "name":  "Assign case",
                            "@type":  "Actioncard"
                        }
                    ],
"text":  "Main text"

}

Here is how my card is looking now: Imgur

Can anyone tell me what I am doing wrong - or perhaps there is a bug here?

Thanks in advance,

Arve

1

1 Answers

0
votes

I was trying the JSON payload and it worked fine. Please try this paylod once and let us know if you still see the issue.

{
"summary": "my summary",
"title": "Main title",
"sections": [{
        "activitySubtitle": "ActivitySubtitle",
        "activityImage": "http://www.ironmagazine.com/wp-content/uploads/arnold-schwarzenegger-420x327.jpg",
        "activityTitle": "ActivityTitle",
        "activityText": "ActivityText"
    }, {
        "facts": [{
                "value": "Facts1 - value",
                "name": "Facts1 - name"
            }, {
                "value": "Facts2 - value",
                "name": "Facts2 - name"
            }
        ],
        "title": "See more - Tittel "
    }
],
"potentialAction": [{
        "actions": [{
                "name": "Add comment",
                "target": "http://www.vg.no",
                "@type": "HttpPOST"
            }
        ],
        "inputs": [{
                "target": "https://www.vg.no",
                "id": "Comment",
                "@type": "TextInput"
            }
        ],
        "name": "Add comment",
        "@type": "ActionCard"
    }, {
        "actions": [{
                "name": "Save",
                "target": "http://www.vg.no",
                "@type": "HttpPOST"
            }
        ],
        "inputs": [{
                "title": "enter a due date",
                "id": "dueDate",
                "@type": "DateInput"
            }
        ],
        "name": "Set due date",
        "@type": "ActionCard"
    }, {
        "actions": [{
                "name": "Save",
                "target": "http://www.vg.no",
                "@type": "HttpPOST"
            }
        ],
        "inputs": [{
                "title": "Assign case to..",
                "isMultiSelect": "false",
                "choices": [{
                        "value": "1",
                        "display": "Person1"
                    }, {
                        "value": "2",
                        "display": "Person2"
                    }, {
                        "value": "3",
                        "display": "Person3"
                    }, {
                        "value": "4",
                        "display": "Person4"
                    }
                ],
                "id": "list",
                "@type": "MultichoiceInput"
            }
        ],
        "name": "Assign case",
        "@type": "ActionCard"
    }
],
"text": "Main text"}

Regards, Vasant