The problem is with the "each [Out]". This is shorthand for "(_) => _[Out]", which doesn't make sense in this context, since the letters in the Alpha list won't have an [Out] field. Instead, it should be (x) => [Out], which will reference the implicit _ identifier defined by the "each" at the beginning of the line.
List.TransformMany in List.Generate => Error
Lz._
8,991
Reputation points
Hi
The following code raises Error "We cannot apply field access to the type Text...":
let
Alpha = {"A".."B"},
Go = List.Generate(()=>
[i = 0, Out = List.TransformMany(Alpha, each Alpha, (x,y)=> x & y)],
each [i] < 2,
each [i = [i]+1, Out = List.TransformMany(Alpha, each [Out], (x,y)=> x & y)],
each [Out]
)
in
Go
Swapping the lists does it:
each [i = [i]+1, Out = List.TransformMany([Out], each Alpha, (x,y)=> x & y)],
However, I really don't understand why the initial code errors out  I must be missing something... I will highly appreciate your insight. Thanks
Accepted answer

Ehren (MSFT) 1,781 Reputation points Microsoft Employee
20210507T23:50:09.37+00:00