0

This dialog prompts a user for an acronym to be searched in a JavaScript Object. When the user input is less than 4 characters the bot returns:

"I didn't understand. Please try again."

When I provide an acronym that is 4 or more characters the dialog works perfectly. Is there a lower bound for the number of characters in a user response?

bot.dialog('AcronymDialog', [ 
    function (session, arg) {
    // Prompts user for an acronym to be searched in an object
    builder.Prompts.text(session, "Please provide the Industry Acronym you wish to be translated.");
 },
    function(session, results) {
        //If response is 4 or more characters this is executed
        session.send(industryAcronyms[results.response]);
    }
]);

Additionally, even if the code in the results function is session.send("Hello, World"); and it never searches the JS objects the response is "I didn't understand. Please try again."

enter image description here

enter image description here

Ezequiel Jadib
  • 14,767
  • 2
  • 38
  • 43
Brennan Casey
  • 887
  • 2
  • 7
  • 17
  • where did you end dialog? – OmG Aug 09 '17 at 20:59
  • I am unable to reproduce the error. It works fine for me using this code: `bot.dialog('/', [ function (session) { builder.Prompts.text(session, "Please provide the Industry Acronym you wish to be translated."); }, function(session, results) { session.send('You picked: ' + results.response); } ])` – nwxdev Aug 09 '17 at 21:28
  • what version of the sdk are u using? – Ezequiel Jadib Aug 09 '17 at 21:32
  • @EzequielJadib I am running off of the Azure Bot Services so I assume that is the current build. – Brennan Casey Aug 10 '17 at 12:50
  • @NilsW I tried my code out in the emulator and my code works properly just like your code. What makes this different in the Azure Bot Services? I will try again in a Skype Channel but I expect the same result as Azure. – Brennan Casey Aug 10 '17 at 13:57
  • If you continue to have problems, please open a GitHub issue here: https://github.com/microsoft/botbuilder/issues/new – nwxdev Aug 10 '17 at 19:35

0 Answers0