How to begin a dialog with a variable value as the dialog name
See original GitHub issueI setup the Event activity with the dialog name as the Activity Value, and then have an expression of =turn.activity.value
in Dialog name field, but does not seem working as it results in a Null Ref exception in the BotController.cs
What would be the correct way to dynamically begin a dialog with the given name through a variable?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to show variable's value in Dialog Name (Einstein Bot)
I have a menu, with two options, and the first show a text with a variable, but {!Product} don't works, there is a...
Read more >Creating the Dialog - IBM
In the Dialog Properties pane: Enter the value Rboxplot_Demo for the Dialog Name. Enter Rboxplot Demo for the Title. Click the ellipsis (....
Read more >Passing Variables in jQuery to Change a Dialog Title
Please change the textbox id with suitable name. try like this. var titleValue=$("#input").val(); $( "#dialog_box" ).dialog({ title: ...
Read more >How to show variable's value in Dialog Name (Einstein Bot)
I have a menu, with two options, and the first show a text with a variable, but {!Product} don't works, there is a...
Read more >How to Make Dialogs (The Java™ Tutorials > Creating a GUI ...
JOptionPane provides support for laying out standard dialogs, providing icons, specifying the dialog title and text, and customizing the button text.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @dawwa and thank you for engaging with the Composer project. Supporting the “dialogs” array in the Composer ui would be a new feature request. We’ll take this issue as a feature request and add it to the backlog for prioritization. We do not have an ETA at this time for when this feature will be available.
@dawwa
It seems to be that there is an issue with how Composer deals with DialogSets internally. The
NullReferenceException
you’re getting is likely because the bot cannot find the dialog in question, and not because of any issue with the user’s input.However, there is a workaround. This issue thread outlines a workaround that involves creating a dummy event that you never call and invoking all of your dialogs in it. Then, invoking the dialog with the input format
=turn.activity.value
in the Dialog name field of your original event should result in the behavior you’re looking for. Make sure to do this in the root dialog (where your event is). If you do it in a child dialog, it may not work.Alternatively, you can go into the code view of your root dialog and add an array of dialogs to achieve the same effect without the need for a dummy event (see image below).