2
votes

I already went through the bot framework documentation and the given examples. Even though, FormFlow accepts dynamic options (answers), I couldn't find a way to dynamically populate both fields (questions) and options (answers).

This is what I'm trying to do. I have class called Questionnaire which includes a list of Questions (another class). Question class includes a header (string) and a list of possible answers. The FormFlow should be populated based on that. However, Questions objects are dynamically populated based on user's first message. Then i make an api call and populate my Questionnaire class and the list of questions inside it. Now, i want to use this upated Questionnaire instance to populate the FormFlow using question header as the field and it's answer list as the options.

Is it even possible to do with the current bot framework sdk? Would appreciate a lot if someone can provide an example. Thanks a lot

1

1 Answers

0
votes

Not sure if you can do it in a single FormFlow in one hit put there is a alternative.

You could create a simple 'AskQuestion' Formflow that simply asks one question, and you could then pass the question text and list of possible answers to it.

When it completes, you can store the user's answer, do the logic and calls to get the next question, and call the same Formflow dialog again to ask the next question.

That should work for you