Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Can this be done in M language

Screenshot_1.png

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 regards Branislav

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

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

vkkfmsft_1-1662606926452.png

vkkfmsft_0-1662606911495.png

 

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

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

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

vkkfmsft_1-1662606926452.png

vkkfmsft_0-1662606911495.png

 

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

Anonymous
Not 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.Screenshot_2.png

Kind regards Branislav

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors