Hello!
I have 2 tables/lists & want to get a count of records with a like tie:
Projects
| ID | Title | Description |
| 24 | This is My Title A | Describing stuff about A |
| 31 | This is My Title B | Describing stuff about B |
| 33 | This is My Title C | Describing stuff about C |
Tasks
| ID | Title | ProjectTie (SharePoint Lookup to Projects.ID) |
| 10 | This is My Task Title A | 24 |
| 11 | This is My Task Title B | 24 |
| 12 | This is My Task Title C | 31 |
| 14 | This is My Task Title D | 33 |
| 15 | This is My Task Title E | 33 |
I am trying to AddColumns in a collection (for a gallery) that will capture the count of Tasks for each Project like this:
| ID | Title (Project) | Description | TaskCount |
| 24 | This is My Title A | Describing stuff about A | 2 |
| 31 | This is My Title B | Describing stuff about B | 1 |
| 33 | This is My Title C | Describing stuff about C | 2 |
I've tried this & a few other iterations of it but the count is either 0 of total count of ALL records in the Tasks table:
ClearCollect(collProjectswithTaskCount,
AddColumns(
Projects,
"TaskCount",
CountRows(
Filter(Tasks, ProjectTie.Id = ThisRecord.ID)
)
)
);
I'd greatly appreciate some help on this, thanks!