microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.21k stars 327 forks source link

Remove in ForAll return type issue? #1685

Closed jorisdg closed 1 year ago

jorisdg commented 1 year ago

Set(list, Table({ Name: "One", ID: 1}, { Name: "Two", ID: 2})) Set(list2, Table(First(list)))

ForAll(list2, Remove(list, ThisRecord))

the return value of this expression: image

if you get that value and try to iterate the fields on the row like this: image

you get an exception: {"InMemoryRecordValue.TryGetField(Value): Wrong field type. Returned b, expected *[ID:w, Name:s]."}

at Microsoft.PowerFx.Types.RecordValue.d__3.MoveNext()\r\n at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)\r\n at (my code)

anderson-joyle commented 1 year ago

Other functions are producing a similar error result: ForAll(t, Coalesce(Blank()))