Hi, I am stuck trying to solve an issue that seems simple to me, but I haven’t found a way to do it.
I have three tables:
Timesheet has many timeentries and each timeentry has a project.
In the Detail view of Timesheet I can see the related timeentries list.
In a timesheet there can be lots of timeentrys and a few projects. I need a way to view the total hours per project for a particular timesheet. I modified the view to group the TotalEntrys by Project and aggregate SUM of Virtual_Hours, but I dont want to see the individual entries below it.
Does anybody knows a way to do this?
To me, this seems to be a very common use case so I guess there must be a way to do it.
Please add another column such as say [_ROWNUMBER] as next in group by settings
For example in the screenshot below the orders are grouped by the [Customer Name] and group aggregate is SUm: Total Cost
Now when we add [_ROWNUMBER} in the group by setting, only one row is shown per customer name
1 Like
Ok, nice trick @Suvrutt_Gurjar .
It works when I open the view as in your example.
However, do you happen to know if it is possible to show it in the detail view as well? This is what I get in the detail view:
If I click on View then it shows the view as in the first screenshot.
Ohhh… stumbled upon this setting and if New Mobile Framework is enabled it does show it in the detail view as expected:
Thank you @Suvrutt_Gurjar
Thank you for the revert. Yes, you are correct that the grouping does not seem to hold when displayed as an inline view in a detail view. I will post back if it is possible through some workaround.
You seem to have enabled the “New Mobile Framework” as a solution. However, if you are using this new mobile framework in a production app, please be aware that this “New Mobile Framework” is in preview mode. So, it is likely to present you with many issues as those are being addressed with the community feedback.
Re: New Mobile Framework In Preview - Page 7 - Google Cloud Community
relevant excerpt from the post below:
Yes this is a production app.
I came up with a workaround that works, but it seems to me like this shouldn’t be needed considering that all necessary relationships to create the summary are already present. This just adds additional complexity. Hopefully, the Appsheet team could come up with some more elegant way to handle such a common task.
On to the workaround:
To view the equivalent of an aggregate of a related child table in a detail view, I had to create a new table that tracks this aggregation as follows:
- Added a new Table: Timesheet_Project. This table will have unique pairs of Timesheet_Project entries based on a new TimeEntry.
This table will keep a total (the aggregate) for each entry as a virtual column:
- Created an action in TimeEntry: Set_Unique_Timesheet_Project. This action adds an entry into the new table Timesheet_Project every time a TimeEntry is created.
To avoid duplicates in the detail view this action only runs if the combination of timesheet id and project id does not already exist in the new table.
- Changed the TimeEntry_Form form saved event: When a new TimeEntry is created, the action to create the pair of values in Timesheet_Project is run.
- Make sure the related Timesheet_Project entries exist in Timesheet:
- Make sure the list is visible in the Timesheet detail view:
Now the summaries are presented in the Timesheet detail view:
1 Like
Wow ! That is indeed an extensive implementation and solution.
If you would like a shorter solution to try, please try below
- Please create a dashboard view of interactive type that has the following constituent views
A. TimeSheet Table Summary view
B. Time Sheet table detail view
C. TimeEntrys table inline view
Please make this dashboard as interactive type.
In the TimeEntry table , please group by Project ID and summation of project hours as you wish.
Then when the Timesheet is selected, the relevant TimeEntrys will be shown by the project ID.
In the example below the when a Customer record is selected, the detail view for that customer and the related orders grouped by order status are presented.
