web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / any substitute for for...
Power Automate
Unanswered

any substitute for for each loop in desktop flow

(0) ShareShare
ReportReport
Posted on by 125

like i want to substitute the for each loop because it taking time any substitite for that

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You can just do a loop, so you can dictate the beginning and end. 

    for example, if I had a spreadsheet and it had 1000 rows, but I only want to process row 2-100.

     

    Launch Excel

    Set variable %LoopMax% to 100

    Loop starting at 2 to %LoopMax% interval of 1

    ’Now %LoopIndex% will always be the row I am on

     

    Same goes with Files:

     

    Get Files

    Loop 0 to 99 increment of 1

    ‘ The current file is always %Files[LoopIndex]%

  • dheeraj867 Profile Picture
    125 on at

    can we use java script for this to run more faster what u think?

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Just did a test, by reading a spreadsheet with 1000 rows.
    Did a loop using FOR EACH and a normal LOOP, in those two loops I converted each row to numbers.
    Both loop's took exactly 47 seconds (running from within PAD)

  • dheeraj867 Profile Picture
    125 on at

    can u try this with Run Java Script

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Could you be more specific?
    My knowdledge about Java is limited.....😊

  • dheeraj867 Profile Picture
    125 on at

    like we applying loop in drag and drop can we do this manually in java scripts i think it will do more faster i never tried but i need suggestion and implementation and my knowledge in js is very limited😅

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Hmmm then you would have to do all your scripting in Java - I think.
    What are you trying to do inside the loop?

  • dheeraj867 Profile Picture
    125 on at

    nope i just finding alternative of for each loop

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Can't see what's wrong with using Loop or For each, it's more likely what you are doing inside your loop that slows you down.

  • dheeraj867 Profile Picture
    125 on at

    like if i have 10000 records it will take more and more time for reducing time that why i need a suggestion that if we apply same in java script then what will happen

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 298 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 159 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 150 Super User 2026 Season 2

Last 30 days Overall leaderboard