Forum Discussion
Can this be done in M language
- 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 SourceBest Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
- Anonymous4 years agoNot applicable
I still have the same problem, because you can't forward a list to Json.Document(Web.Contents function. Is there a way, to loop entire function, because I need entire code to be executed for each of those weblinks? That was my actual question. It doesn't matter if I put list with just app insight Id, or entire link, as long as it is list.
Kind regards Branislav