none
Working with BOT Framework RRS feed

  • Question

  • Hi,

    In BOT emullator I am displaying some data using adaptive cards,later I tried entering comment using action.submit, this is the code:

    "actions": [
    {
    "type": "Action.ShowCard",
    "title": "Change assignee",
    "card": {
    "type": "AdaptiveCard",
    "body": [
    {
    "type": "Input.Text",
    "id": "changeAssignee"
    }
    ],
    "actions": [
    {
    "type": "Action.Submit",
    "title": "OK"
    }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
    }
    },
    {
    "type": "Action.ShowCard",
    "title": "Comment",
    "card": {
    "type": "AdaptiveCard",
    "body": [
    {
    "type": "Input.Text",
    "id": "test",
    "isMultiline": true,
    "placeholder": "Enter your comment",
    }
    ],
    "actions": [
    {
    "type": "Action.Submit",
    "id":"submit",
    "title": "OK",
    "data":
    {
    "button":"Ok"
    }
    }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
    }
    }
    ]

    but nothing is coming in bot emulator..how to work with this?




    Thursday, October 10, 2019 6:38 PM

All replies

  • Hello Varsha,

    I believe you are using the adaptive card submit action’s data property as an object. Looking at the JSON mentioned above it looks like it might not be constructed correctly so the card is failing to render. 

    Could you please try to use your full JSON document in the designer and check if the render works? 

    -Rohit

    Friday, October 11, 2019 7:00 AM
    Owner
  • Hi,

    Do Action.Submit works on same card or do I have to render another card on Action.Submit...

    I followed many links they are passing data same as object:one of the link is this::

    https://stackoverflow.com/questions/49134675/action-submit-buttons-in-adaptive-card-does-not-render-in-skype..

    but i am not getting any value in bot emulator.When I am entering the comment it is again opening the welcome message..not the one I am entering.Do I have to do something else in json on click of OK button, like any other code or something.


    



    • Edited by varshagupta Friday, October 11, 2019 1:18 PM
    Friday, October 11, 2019 8:38 AM
  • hi,

    any update on this..I am not getting any solution.




    • Edited by varshagupta Saturday, October 12, 2019 7:02 PM
    Saturday, October 12, 2019 7:02 PM
  • Hi Varsha,

    Did you get a chance to use the designer to render the JSON and check if it works as expected?

    If you are looking for documentation/behavior or samples to implement Action.Submit with an object please use the steps mentioned in this link.

    Monday, October 14, 2019 4:50 AM
    Owner
  • Hi,

    IN THIS link they have used c# but I am using javascript but not getting how to use action.submit.

    I want when user clicks on submit, then the comments which user posted in BOT emulator should get save in ticket about which he/she is commenting.How can we do this?







    • Edited by varshagupta Tuesday, October 15, 2019 10:12 AM
    Monday, October 14, 2019 4:59 AM