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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Loop through Input Var...
Power Automate
Suggested Answer

Loop through Input Variables

(1) ShareShare
ReportReport
Posted on by 13
Hello, 
 
I'm trying to loop over input variables with the loop index.
I have Input: Code_1, Code_2, etc
I need to use the variable value to write it on a Excel. I tried %Code_%LoopIndex%% 
 
Is there anyway to achieve this? 
 
I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
    Hey Hi,
     
    What is the issue actually.Can you ellabrote what do you want in detail.
     
     
    Regards,
    Vishnu Reddy
  • Suggested answer
    eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at
    I don't think you can reference variable name dynamically like that. You are referring to the first part of many variables and then ending it with another variable which would give the full name. Now the PAD thinks you have Code_ -variable which you don't. You have Code_1 and Code_2 etc.

    I would advice you to change the Code_1, Code_2, Code_3 etc to either list or datatable.
    Datatable:

    Then with for each loop go through the columns

    or list:


    Then just loop the list whole list
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard