Forum Discussion
JVos
Helper IV
7 years agoInsert empty row without explicitly specifying column names
For adding one empty row to the "Sorted rows" intermediate result I have the following code: Table.InsertRows(#"Sorted Rows", 0, {[RoutingCropGroupCode = "", RouteName = "", LineNumber = "", Perc...
- 7 years ago
Also this one.
This uses your Table.InsertRows method
= Table.InsertRows(#"Sorted Rows", 0,{Record.FromList(List.Repeat({""},Table.ColumnCount(#"Sorted Rows")),Table.ColumnNames(#"Sorted Rows"))})
Zubair_Muhammad
Community Champion
7 years ago
Also this one.
This uses your Table.InsertRows method
= Table.InsertRows(#"Sorted Rows", 0,{Record.FromList(List.Repeat({""},Table.ColumnCount(#"Sorted Rows")),Table.ColumnNames(#"Sorted Rows"))})- JVos7 years ago
Helper IV
Zubair_Muhammad: Works perfectly, thank you!
- ChemEnger3 years ago
Advocate V
Just to add that this won't create a truly empty row - it inserts "" and should instead use
List.Repeat(null)