I am creating a form where a number of teams fill a few details that include them rating other teams as rank1 or 2. At the end of the loop, I would like to calculate which team has had the most number of occurances at and then at 2. Any ideas how we can do that?
FYI take a look at the max() and sum() functions. You may be able to exploit them for your intended purpose, depending on how exactly you capture these team rankings.
I am assuming the rankings you mention are in lines 58 (best_idea_in_class) and 59 (second_best_idea_in_class).
In order to achive what you mention, I would create several variables with "calculate" before the end of the repeat group, where each team would have 2 variables named "first_TeamX" and "second_TeamX" (X being a letter from A to O for what I can see in your file; in total 30 variables (15x2)).
Here you can use a variable "note" to show the overall results for all teams and/or max() to know which is the maximum number of votes a single team received in each category.
The other alternative I can think about is using several if(), and I am not sure how a tie would be handled.
The way I have set up the ranking is that the person just to choose the team name from a drop down.
But this currently is happening over a loop function.
So
Team A
Details
Details
Details
Ranking Other teams - 1 - Dropdown with a list of all teams
Ranking Other teams - 2 - Dropdown with a list of all teams
Entries for Team B Begins
...
I thought both Max and Sum are number driven expressions. It was after my confusions with the numbers that I finally made it where they choose the team. That way I can at least look at the output google sheets and figure the team that got ranked most. Yet it would be great if I could find most chosen response from a drop down in a repeated set within a loop.
So before the version of the xls I have posted here, I tried with Sum, Count, Max but clearly not writing the formula enough. I had each team being given a rank number, tried the rank function widget and choosing from a radio button. In all the cases, I was still not able to find a proper way to say that in all the loops filled so far, Team A was the most chosen response to question on best ideas, Team B was most chosen to question on second best idea.
I somehow seem to make some calculation error within the loops and I am.not sure what am I doing wrong here. The screen now does not allow me.to move past this stage. Any help.would be highly appreciated !
Also, when I run the script , all things that are mentioned as xyz ends up be italicised. Like in this case, if I run a calculation that says all_first_rank ... It turns into an italicized version of the word first. Same thing w the school name. Any work around suggested?