You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As in the alarm bot sample, I built a dialog to collect some basic information about stocks to be added to a portfolio. I'm basically prompting for tickerSymbol and quantity if I don't have them. My bot collects the ticker symbol and then asks the user for quantity (which I'm currently treating as a string). The issue is that the quantity response (e.g. "50") then gets set as the ticker symbol, and the bot gets stuck in a loop (see screenshot below).
router: (dialog)=>first(dialog.routeTo(textPrompt,_=>!dialog.state.tickerSymbol&&{prompt: "What stock would you like to add to your portfolio?"},m=>{if(validateStockName(m.dialogResponse.text,m))dialog.state.tickerSymbol=m.dialogResponse.text;returnreroute(m);}),dialog.routeTo(textPrompt,_=>!dialog.state.quantity&&{prompt: `What quantity of ${dialog.state.tickerSymbol} would you like to add to your portfolio?`},m=>{dialog.state.quantity=m.dialogResponse.text;returnreroute(m);}),
It seems like activating the second text prompt is effectively activating the first, which takes precedence in order.
The text was updated successfully, but these errors were encountered:
As in the alarm bot sample, I built a dialog to collect some basic information about stocks to be added to a portfolio. I'm basically prompting for tickerSymbol and quantity if I don't have them. My bot collects the ticker symbol and then asks the user for quantity (which I'm currently treating as a string). The issue is that the quantity response (e.g. "50") then gets set as the ticker symbol, and the bot gets stuck in a loop (see screenshot below).
It seems like activating the second text prompt is effectively activating the first, which takes precedence in order.
The text was updated successfully, but these errors were encountered: