Using custom states set on different groups to deliver a filtered list in a repeating group

:woozy_face: Hello.

Ok so here is what I am trying to do - and can’t seem to find a close enough example yet…

I’m going to make up a working example here. A group (will call it “question 1”) with 2 choices inside the group loads (these choices are both buttons). Let’s say the group asks you what kind of vehicle you are looking for. When you click on either button a custom state is saved to the group “question 1” (lets say custom state is “car type”=text). Each button saves the state in a worflow ie button 1 saves “car type” with value “car” and button 2 saves “car type” with value “truck”. Then a “next” button is clicked to bring you to question 2 which is a new group (we will call it “question 2”). The process is repeated saving another custom state to "question 2"s group - let’s say custom state equals “door number=number”. What I want to do is to be able to push a “submit button” at the end of question 2 which triggers a search to the database for all vehicles - lets call that “vehicles” then filters the search based on answers to question 1, followed by answer to question 2 and displays the data which is pulled from database in a repeating group. To continue example when you hit submit button it would look for the data field “vehicles” (then data type could be structured as an option set looking for “cars” and “trucks”) or the data structure could be set with fields of both type “car”=y/n and “truck”=y/n. In either case there is good matching between the custom states and type of data that is being searched for. Once that “car” or “truck” list was created the next step would go on to create a door number list - let’s say “2” or “4”. From there the new filtered list (let’s say of “car” and “4 door”) would be displayed in a repeating group.

Hopefully that makes sense. I can’t quite seem to get the order right for how to pull the data through. It seems “:filter” might be one option - but getting a wee bit lost in the order with the editor.

Any help is greatly appreciated!

Hi there, @ccabaj… if I have followed your explanation correctly, you should be able to achieve the desired result with one workflow step on the submit button that displays a list in the repeating group using the custom states as constraints on the search. So, something like this…

I hope this makes sense, and I hope it helps you get down a good path.

Best…
Mike

Thanks @mikeloc - that makes complete sense. :grinning:

This topic was automatically closed after 70 days. New replies are no longer allowed.