Show Aggregate value on list page

Show Aggregate value on list page

  

Hi,

I would like to display in my StudentsList page the average that students have in the exams.

My StudentsList preparation:

GetStudents Aggregate:

GetExamsResults Aggregate:


My StudentsDetail pages:


Resume:

Student 1 - Average 3
Student 2 - Average 4
Student 3 - Average 0
Student 4 - Average 5


But on my page, in the average column, what appears is this:


My expression value for Average - GetExamsResults.List.Current.ResultAvg


How can I show the average of each student in my list of students?

Regards,

Clara



Hi.

You can add a column to the aggregate to contain the average and you can group the aggregate by student Identifier.

That way you can do what you need.

Hi Gonçalo,


Sorry, but on my GetExamsResults Aggregate I have that.

1 - Group the aggregate by student Identifier;

2 - Count Rate by student Identifier;

3 - Average by student Identifier;


Regards,

Clara

Solution

Clara Cardoso wrote:

Hi,

I would like to display in my StudentsList page the average that students have in the exams.

My StudentsList preparation:

GetStudents Aggregate:

GetExamsResults Aggregate:

But on my page, in the average column, what appears is this:


My expression value for Average - GetExamsResults.List.Current.ResultAvg


How can I show the average of each student in my list of students?

Regards,

Clara



Since your TableRecords is bound to the GetSudents.List, GetExamsResults.List.Current.ResultAvg will not be iterated and will always hold the first record.

You need to merge together both your aggregates:

  1. Your GetStudents would join the Student with or without the ExamResults and,
  2. group by the attributes Id, FirstName, LastName and Email.
  3. Then you can add an Average computed attribute column that, like the name implies, averages the values on column Result (after group by takes place).

If you use the above Average name, your GetStudents aggregate will return all the attributes you want to display, and your expression value for Average would be GetStudents.List.Current.Average.

Solution

Sorry I missed that.

The solution that Jorge pointed should do the work.

If you want, you can also do all the magic inside an advanced query.



Hi Jorge, Hi Gonçalo,


@Gonçalo - No problem and thanks for your answer.


@Jorge - Thanks for your help and your solution. Thank you.


Regards,

Clara