BotFramework-Composer
BotFramework-Composer copied to clipboard
LG for 'choices' field in multi choice input results in Warning
Repro bot attached.
I defined an option set as bot responses for YesNo() as shown in the image below

Then, I add a multi choice input which uses ${YesNo()} as array of choices

When doing this, I get a warning in composer

However, this usage should be correct and is even contemplated in the ChoiceInput code in the SDK:
if (Choices.ExpressionText != null && Choices.ExpressionText.TrimStart().StartsWith("${", StringComparison.InvariantCultureIgnoreCase))
{
// use ITemplate<ChocieSet> to bind (aka LG)
return await new ChoiceSet(Choices.ExpressionText).BindAsync(dc, dc.State).ConfigureAwait(false);
}
else
{
// use Expression to bind
return Choices.TryGetValue(dc.State).Value;
}
The code excerpt is from here: https://github.com/microsoft/botbuilder-dotnet/blob/main/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Input/ChoiceInput.cs#L236
Seems like the Choices field is ObjectExpression but should allow LG in the UI canvas.
Repro bot: Empty_export.zip