Question options from sheet values?

(Brandon Saxon) #1

Hey there! Is it possible to have a question where the options generate from a google sheet, based on the values searched from a previous question? For example, my sheet has columns “year”, “model”, and “engine”. I’d like the flow to ask them enter a year and then I can compare their value against that column, I would think the row search would suffice for this? Say the user enters that their year is 2005, I would want to filter the sheet so the model column only shows those first few under 2005, and then have a new question asking the user to select a model where each button is one of those models. And then I’d ideally like to repeat the process that when they select a model, it will ask them to select an engine, only displaying options from within that filter as well.
example

I would think this might be doable using a little code, rather than one of the built-in options, but I can’t say I really know enough about it to make it happen, so I will gladly take any advice anyone can spare! And of course, if it is doable through the built-in options, that’s even better, so I don’t have to worry about breaking anything. Thanks in advance for any help!

(Ruth Malone) #2

The same answer I gave here should work: How to filter csv using multiple inputs?

Ask the user all three questions at the same time, string them all together, and then a column in Excel which is a concatenation of all three columns to search again.

(Brandon Saxon) #3

Thanks, Ruth. I appreciate you taking time to respond! Unfortunately, that’s not quite what I was looking for. (and that may be my bad, I’m not sure I worded it correctly).

I’m wondering if there’s a way to set it up so that when I ask the first question, the options for the second question generate. So, for example, the user might tell me they have a vehicle from 2005, I’d then like a multiple choice question to appear that asks what model they have and the buttons that show up are only the models from the list that have the year they entered. That way, the user can’t enter a year/model combination that doesn’t exist.

I do have it set up right now with your original concatenation method so that if that they enter a combo that doesn’t exist, the chat bot simply says it isn’t there and starts over, but if there was a way to sort of ‘steer’ the user towards acceptable answers, I thought it might help a little. But I’m not sure if that would require some fancy coding or if there’s a way to simply/easily make the buttons reflect the filtered sheet?

(Ruth Malone) #4

Hi Brandon,

Sorry - I didn’t realise you asked the other question too!

Re. filtering down the next options, I have done this in one of my flows using filters, where in my case I want the user to order each of them. For example, the first question has options A, B, C and D. If the users picks A, I then use a filter to present them next with B, C and D. If they pick B the first time, I use a filter to present A, C and D, and so on… I think you could do something similar.

It was time-consuming and complicated to set up, but worked well. I mapped it out in a flow chart first so I could make sure I had mapped it correctly.

Hope that helps if you can’t find another way.

Ruth

(Brandon Saxon) #5

No worries!
Thank you again for taking time to help! I hadn’t thought of using any filters, I’ll look into that and see if it might be what I’m looking for. I can see how that might get complicated, as you had said, so I might just stick with your original concat advice!