Skip to content

Choice Prompt not behaving properly in Bot Framework V4 #4619

@Monomoy88

Description

@Monomoy88

Version

Microsoft.Bot.Builder.Azure, Version=4.5.2.0
Microsoft.Bot.Builder.Dialogs, Version=4.5.2.0

I've updated the version to 4.10.3 but problem still exists.

Describe the bug

I've created a Dialog bot which is responsible for showing ChoicePrompts based on QnAMaker contextual question answers.

var promptOptions = new PromptOptions
{
    Prompt = MessageFactory.Text(botResponse),
    Style = ListStyle.SuggestedAction,
    Choices = promptChoices
};

return await stepContext.PromptAsync(nameof(ChoicePrompt), promptOptions, cancellationToken);

As I'm using choice prompt so in the next waterfall step I'm trying to read the user choice using below code
var response= ((FoundChoice)stepContext.Result).Value;

In a certain case I've two options like below
image

While I'm choosing the 2nd option I'm getting 1st value in the stepContext.Result however stepContext.Context.Activity.Text is showing proper value that I've selected from bot.
image

Most of the cases its working fine i.e. value of stepContext.Result and stepContext.Context.Activity.Text are same.
Is it happening for the special characters >= and < ?
If so then what is the workaround regarding this?

Expected behavior

((FoundChoice)stepContext.Result).Value & stepContext.Context.Activity.Text should return same value if ChoicePrompt is used to render prompt in previous waterfall step of a dialog bot.

Metadata

Metadata

Labels

Area: SDKGeneral SDK issues that don't clearly map to other areas (e.g.: helper methods)Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.P1Painful if we don't fix, won't block releasingSize: SThe issue is simple and well understood, it will take a day or less to completebugIndicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions