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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
poornayes
Frequent Visitor

URGENT..web.contents in list.generate

I am using web.contents inside List.Generate.

I want to run the loop only when I get response for the first api hit.

 

I meant the loop should only run when it gets response for the previous hit.

 

Thanks,

Poorna.

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hello @poornayes ,
you can nest your List.Generate function in a condition.

if (action that checks if you get a response for the fist api hit) then (run the List.Generate) else (do something else)

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors