botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[c#] ask question only once

Open rlilov opened this issue 10 years ago • 2 comments

I am linking 2 FormFlows with ContinueWith.

1st form ask only about language selection (en,fr,etc.) and when it finishes in ContinueWith I save user choice in PerUserInConversationData, set the message.Language to selected culture, call second form and it is displayed in the correct language (using the respective localized recourses)

Each iteration however is asking the user about language choice and I would like to avoid this and start with second form with real questions if user has already answered language choice in a previous session. I have this stored in PerUserInConversationData databag.

Worst case scenario if he wants to change the language he will do /deleteprofile

Will appreciate any hints how I can achieve this.

rlilov avatar Jun 13 '16 13:06 rlilov

I wonder if you can start the FormDialog with an initial state that you've obtained from the PerUserInConversation data bag - so you would need one additional root dialog to obtain the initial state from the data bag and then pass it to the language selection FormDialog. @chrimc62 ?

willportnoy avatar Jun 13 '16 16:06 willportnoy

Thank you ! Based on your suggestion I managed to achieve what I wanted

rlilov avatar Jun 14 '16 12:06 rlilov