960
Views
6
Comments
Create a total row on a table records. 

Hi there,

I have a table records widget that shows Time Report Items, with the columns DescriptionStart Date, End Date and Number of Days. I want that the last line of the table records shows a total of the Number of Days but I'm currently struggling with it. 
 
Any tips about the best way to do this?

thanks,

2012-08-01 17-33-40
Gerry
Use a variable to add them up and then add a dummy record with the total.
2016-07-05 09-30-16
Tiago Silva
Gerry wrote:
Use a variable to add them up and then add a dummy record with the total.
 I got through the aggregate with a for each and stored the total in a variable, but i don't know where to go from here, how should i create the dummy record you mention? i haven't seen anything similar in the tutorial videos,

thanks for the help
 

2012-08-01 17-33-40
Gerry
Say for example you have a record list variable containing these records. Use the List Append action to add a record at the end and choose one of the columns to hold your total. Then refresh the list.
2016-07-05 09-30-16
Tiago Silva

I managed to solve it with your suggestion, thanks.
UserImage.jpg
Juju2

Tiago Silva wrote:


I managed to solve it with your suggestion, thanks.


Hi Tiago,


I am trying to do the same but i am struggling on the " aggregate and  for each" parts. Could you please advise or share part of your code? Many Thanks.

2024-05-03 14-03-28
Sudip Dey

Hi Tiago,

As I understood you need to do a sum operation of the total days. So for that, you can take a separate aggregate and do the sum of the day's columns. Also, you have to create a table for it with a row. and on that row, you can take an expression and put the Result of the sum column.

If it is not the scenario then please share the OML file so I can able to do the update on it.

Thank you,

Sudip

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.