Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Can this be done in M language

Can I iterate over Result list, and put every element of a list as a variable, and to put that variable in the link I marked? Can it be done, with all the other code working as it is? Kind reg...
  • v-kkf-msft's avatar
    4 years ago

    Hi Anonymous ,

     

    You can try the List.Generate function.

    This is the sample code.

     

    let
        Result = List.Count(Table[Column]),
        Source = List.Generate(() => [x=0, y= "http://test_url/" & Table[Column]{0} & "/query" ], each [x]<Result, each [x=[x]+1, y= "http://test_url/" & Table[Column]{x} & "/query"], each [y]  )
    in
        Source

     

    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.