Display of results based on drop down list selections

Hi Folks

I’m wanting to display a list of results based on the information that I choose from a drop down.

The data is stored in the database in a collection called ‘selections’,

My page has the following dropdown fields:
Round, Day, Side. For the 3 fields, I’ve used a formula of Unique_by_key and MAP to return the data from the ‘selections’ collection.

How do I get the “result” to display information with labels as:
Team 1
Lead: team 1 leads name
Second: team 1 seconds name
Third: team 1 thirds name
Skip: team 1 skips name

Team 2
Lead: team 2 leads name
Second: team 2 seconds name
Third: team 2 thirds name
Skip: team 2 skips name

etc,
there would be a maximum of 4 teams, depending on which day is selected.
Some sample data is:
{
“select_day”: “Saturday”,
“select_team”: “3”,
“select_lead”: “Team 3 leads name”,
“select_second”: “Team 3 seconds name”,
“select_third”: “Team 3 thirds name”,
“select_skip”: “Team 3 skips name”,
“select_side”: “1”,
“select_round”: “1”
},

I have no idea on where I should begin with this, so hoping to be pointed in the right direction.

Thank you.
Karen

Is this at any way possible?
Am I better off using the javacript flow logic instead of a formula?

check out this tutorial maybe its what youre trying to do

Thank you for getting back to me on this.

I found that powerup video, after I asked the question as to whether my “problem” could be solved or not.
I’ll take a look at it his weekend and will let you know if I have any issues.

Thanks
Karen

1 Like

The easiest approach to the problem is as follows:

One. Manipulate the data in the database so that you feed AppGyver a list of objects with the following format

Team 1
Lead: team 1 leads name
Second: team 1 seconds name
Third: team 1 thirds name
Skip: team 1 skips name

Team 2
Lead: team 2 leads name
Second: team 2 seconds name
Third: team 2 thirds name
Skip: team 2 skips name

To accomplish this, use SQL SELECT and GROUP BY team name

Two. Display this list using nested containers, as follows::

  Outer Container (use Repeat_With = selections)

     Paragraph: ( use Label = team name)

     Inner Container ( use Repeat_With: current)

          Use a List to to display the contents of a team ( use List of Items in Repeat)

Three. Use the dropdowns as simple filters, tying the Visible field of the list (or the inner container) to a page variable with the dropdown selection.

Hope this helps

Thank you for that. I shall give it a go this weekend.
That all makes sense except for point 1 (I’m using restdb.io as my database). I’m assuming that will create pageVar with a formula doing the select and group by.
But, let me have a go first and I’ll come back to you.

Thank you for your help with that. That works perfect.