Forum Discussion

JustDavid's avatar
JustDavid
Helper IV
1 year ago
Solved

Insert text to a list dynamically from another list/table

I'd like to 2 things to my existing list.   Modify text in list Append existing list Nth times depending on the values that's coming from another table/list (currently print screen showing as tab...
  • AlienSx's avatar
    1 year ago
    let
        string_to_add = #table({"Data"}, {{"A"}, {"B"}, {"C"}}),
        list_to_add = List.Buffer(string_to_add[Data]),
        current_list = {"text | text | text", "sometext | sometext | sometext", "string | sometext | anothertext"}, 
        addition = List.TransformMany(
            current_list, 
            (x) => list_to_add, 
            (x, y) => y & " | " & x
        )
    in
        addition