Search code examples
node.jsbotframework

Bot Framework 3.0 - Adding dynamic values an interdependent values to drop down


We have an Azure based Chatbot built on NodeJS. We have an adaptive card that looks like this:

As you can see we are asking the Group and Role information in the form of a text box. With text boxes, there is every chance for a manual typo.

enter image description here

So we are trying to explore two options:

  1. Can we populate the contents of a drop down manually, say from a query to a database etc?.
  2. Can we populate the contents of a drop down ( say Role ) based on what was selected for the drop down ( say Group )?. Note: Group has multiple Roles. And the number of Roles in a Group vary. So we want to increase usability by dynamic population of content.

Please share any references/thoughts that you may have. We are using Microsoft Bot Framework V3.

Thanks, Pavan.


Solution

  • For client-side questions like these, it's irrelevant whether you're using the Bot Builder SDK v3 or v4.

    When you're using Web Chat there are some tricks you can do with Adaptive Card extensibility. But when you're using Teams you don't have control over the client and so you can only use the Adaptive Card functionality that Teams has defined for you.

    Have a look at this blog post to learn more: https://blog.botframework.com/2019/07/02/using-adaptive-cards-with-the-microsoft-bot-framework/