I wanted to append delimiter | (pipe symbol) to differentiate each Maintenance Record. Field of a List unless it’s not last record
e.g. List of Aircraft {0001, 0002 etc.} each Aircraft has records of Maintenance work pending.
Maintenance Description
{
0001 - To do A, To Do B, To do C
0002 - To do D, To Do F
}
with below M query snippet, when I loop through each Maintenance Description it append an extra | (pipe symbol) at end I would like to remove that
#"Extracted Values" = Table.TransformColumns(
#"Filtered Rows",
{
"WorkLoadDetails",
each Text.Combine(
List.Transform(
_,
each ( Record.Field(_, "MaintenanceDescription") & " | "
}
))
Now data is shown like
Maintenance Description
{
0001 - To do A | To Do B | To do C |
0002 - To do D | To Do F |
}
I want to remove that extra pipe symbol at the end. How can I know if its last record of list when I loop through each?