Hi @RandyHayes
I'm so sorry for confusing you this way... and again, thanks so much for your time so far. I really hope I can solve this soon. The end goal was like in the Excel screenshot I attached in one my previous posts.
...And with your help, I was finally able to set it up correctly. Thanks again!
But then... Once everything was working, I continued improving on it and, what I didn't mention at the beginning of this post is, that every project has "project tasks". So I went ahead and wanted to implement them as well... that worked too! I could replicate all the relevant tables and values in a collection, but now I'm stuck because with an additional table - project tasks - I would need to get 3 levels of nested galleries and I just found out that it isn't possible with Power Apps :-/.
This is what my collection looks like (and I have it in a collection because the user should be able to add more "projects" to this collection with a click of a button...):

This is my formula to create the collection. Note that I often get some records with First() - this is just for testing purposes. Later on, I'm planning to let the users choose their displayed projects manually (but that should be easy to adjust, once everything is working as it should).
ClearCollect(
colProjectTimeTrackingv3,
With(
{
// adds the users time trackings to a temporary variable
thisTimeEntry: ShowColumns(
'Time Trackings',
"crc06_billed",
"crc06_comments",
"crc06_date",
"crc06_hours",
"crc06_name",
"crc06_Project",
"crc06_User"
)
},
{
// creates the project column
Projects: LookUp(
Projects,
Project = First(thisTimeEntry).crc06_Project.Project,
Name
),
// creates a new table for all the project tasks connected to the project in the 'Project Tasks' column
'Project Tasks': AddColumns(
ShowColumns(
Filter(
'Project Tasks',
Project.Project = LookUp(
Projects,
Project = First(thisTimeEntry).crc06_Project.Project,
Project
)
),
"crc06_billable",
"crc06_name",
"crc06_Project",
"crc06_projecttaskid"
),
// adds 7 days from the selected date (calendar) to each project task inside the column 'GalleryDate'
"GalleryDate",
ForAll(
Sequence(7),
With(
{
selectedDate: gblFirstDayOfMonth + Value - Weekday(gblFirstDayOfMonth, StartOfWeek.Monday)
},
{
Date: selectedDate,
timeTracked:
ShowColumns(
Filter(
'Time Trackings' As tempTimeTracking,
Date(Year(tempTimeTracking.Date),Month(tempTimeTracking.Date),Day(tempTimeTracking.Date)) = selectedDate,
tempTimeTracking.Project.Project = First(thisTimeEntry).crc06_Project.Project
),
"crc06_billed","crc06_comments","crc06_date","crc06_hours","crc06_name","crc06_ProjectTask","crc06_Project"
)
}
)
)
)
}
)
)
Thanks again and kind regards,
*edit*
On Google I just found a screenshot of what I roughly need. The guy who did this App didn't nest the project-tasks... without the nested tasks I would already have what I need. However, if somehow possible (...) I would really like to have the tasks nested below each project. Its just a user experience/personal thing... 🙂
