• Resolved crowwoods1

    (@crowwoods1)


    Hi,
    I run an Earth Day Challenge every year, and I can see that this would allow me to add up points for each participant without downloading a CSV file.
    1. Each participant belongs to a team. Can it also add up total points for all the participants on a team?
    2. Can a ‘Team’ list be generated and sorted by the team points?
    Thanks!
    Ivy

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @crowwoods1

    I’m sorry, but I would need additional details.

    Q: Can it also add up total points for all the participants on a team?

    Q: Can a ‘Team’ list be generated and sorted by the team points?

    A: How are you representing the participants and teams? Where are their details and points?

    The project implementation depends on the structure of data.

    Best regards.

    Thread Starter crowwoods1

    (@crowwoods1)

    Hello, codepeople,

    Each participant will indicate/update how many days they’ve done a number of activities for the duration of the Challenge to earn points. e.g. turn off lights when not in use – 5 days in the Days-Turn-off-lights field, use alternative transportation – 12 days in the Days-Alternative-Transportation field. It sounds like your form can add up all the number of days they’ve done all the activities and use a multiplier to calculate the points. So I would have a field ‘Total Points’ on each record.

    Each participant also signs up for a team, and the team that earns the most points collectively wins a prize. The Team Name can be already there as a choice, or the participant can add a new Team Name. On each record is a field ‘Total Team Points’ so that on condition that the team name matches, the Total Points get added up.

    So then I need two lists to show the participants. 1. each participant’s name and their team name and their Total Points, sorted by their Total Points; 2. each teams’s name and Total Team Points, sorted from the most to least Total Team Points.

    It sounds I can easily do 1. with your form. But I am not sure I can also do 2. Does that make sense?
    Ivy

    Plugin Author codepeople

    (@codepeople)

    Hello @crowwoods1

    You did not describe the data structure.

    I’ll try to describe a possible project from the point of view of the form’s developer. For example, assuming you have stored the users’ information in the database’s table “users_information” with the columns’ structure:

    user, team, activity, points

    You can use the set of DS fields (distributed with the Developer and Platinum versions of the plugin) to read the information from the database.

    Continuing with the example, you can insert a RecordSet DS field with the query below to get the list of users, with their teams, and the total points per user:

    SELECT user, team, SUM(points) as total_user FROMusers_informationGROUP BY user ORDER BY total_user DESC

    Or to get the list of teams with the total of points per team sorted by point in descending order:

    SELECT team, SUM(points) as total_team FROMusers_informationGROUP BY team ORDER BY total_team DESC

    Or you can read the complete table into a RecordSet DS field and make the calculations from the equation in a calculated field.

    Please, read the following blog post:

    https://cff.dwbooster.com/blog/2019/02/14/ds/

    Best regards.

    Thread Starter crowwoods1

    (@crowwoods1)

    I didn’t realize that the Calculated Fields Form doesn’t provide the data structure.

    Last year, I used the plugin Participant Database to generate the Participant Record and the lists. Can I use the Calculated Fields Form in conjunction with the Participant Database just to do the points calculations automatically?

    Thanks, Ivy

    Plugin Author codepeople

    (@codepeople)

    Hello @crowwoods1

    The “Calculated Fields Form” plugin includes its own set of controls to get the information from external data sources, like databases, CSV files or JSON structures. Please, read the blog post I recommended in the previous entry:

    https://cff.dwbooster.com/blog/2019/02/14/ds/

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘adding the fields on multiple records’ is closed to new replies.