Hi,
I have 2 collections, c1 just contains values, and c2 is the result of a groupBy of b column of c1:
ClearCollect(c1, {a:1, b:1}, {a:2, b:1}, {a:3, b:3}, {a:4, b:1});
ClearCollect(c2, GroupBy(c1,"b", "rest"))
So in the c2 collection we have 2 columns:
- "b" which contains a value
- "rest" which contains a single column table named "a"
Let's say I want to update the first row of c2, I want to add a new column to the table in the "rest" column.
I tried to construct this new table elsewhere like this and it worked well:
AddColumns(First(c2).rest, "test", true)
But when I want to apply the changes to c2 with Patch it doesn't work:
Patch(c2, First(c2), {b:-1, rest:AddColumns(First(c2).rest, "test", true)})
Event stranger, I can change the "b" column value without any problem. So there is probably something I am missing with tables. Could anyone explain me what I don't understand here? Why is the table not changed in c2 collection?
Thanks