@PowerRanger
Yes - the datashaping formulas are an awesome tool on top of the ForAll tables. They give you a lot of flexibility on creating the tables exactly the way you want.
Whenever you have that concept of a ForAll with a ForAll, you will immediately need to think of Ungroup as you will want to "normalize" your table to be a flat set of records to send to patch in a table. It would be highly confused with a table with a column of tables!
Yes keep at that ForAll! Once you really grasp it how it was intended, it becomes one of those "ah ha" moments in PowerApps design because you can use it so much to shape and build tables exactly as you want.
Some bonus material - there are many times that you want to AddColumns to a table that are based on looking up a record and then performing either an operation to get a column from the lookup or perform calculations on it. ForAll becomes an *awesome* replacement for AddColumns.
Ex.
AddColumns(someData As _source,
"ATitle", LookUp(someSource, ID=_source.someColumn, Title),
"AQty", LookUp(someSource, ID=_source.someColumn, Qty),
"ACost", LookUp(someSource, ID=_source.someColumn, Cost),
"APrice", LookUp(someSource, ID=_source.someColumn, Cost) * LookUp(someSource, ID=_source.someColumn, Qty)
)
This can get unwieldly and causes a Lot of LookUp data actions. Ideally a With statement would be preferred, but there is no way to place a With in an AddColumns....SO - ForAll to the rescue, and the above becomes:
ForAll(someData As _source,
Patch(_source,
With(LookUp(someSource, ID=_source.someColumn),
{ATitle: Title,
AQty: Qty,
ACost: Cost,
APrice: Cost * Qty
}
)
)
)​
This is equivalent to the above, but there is only One lookup operation performed and the formula is much easier to read and maintain!
Anyway - I could go on forever about ForAll uses. I still am needing to find time to complete my video series on <spoiler> "ForAll you know!" 😁