Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Increment a variable in a CSV table

(0) ShareShare
ReportReport
Posted on by 691

Hello, I am creating a CSV table and I would like for each row of the table, there to be a number that increments by 1 in the "Temporaire_ID" field. Can you help me please ?

 

s44_0-1708724537415.png

 

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: Increment a variable in a CSV table

    Hi @s44 

     

    Here is the sample flow:

     

    I have taken an array of objects in the compose action:

    ManishSolanki_0-1708744691205.png

    [
    {
    "Name":"Manish Solanki",
    "Profile":"Tech Architech"
    },
    {
    "Name":"Arun Solanki",
    "Profile":"Owner"
    },
    {
    "Name":"Arnav Solanki",
    "Profile":"Student"
    }
    ]

     

    Next, add "Select" action. We will use expression in 'From' parameter to iterate the elements of array. Expression needs to be added in the expression box:

    ManishSolanki_1-1708744811730.png

    range(0,length(outputs('Compose')))

     In Map parameter, enter the below key/value. The Id will the counter of iteration. For value, we will extract the array element by index using expression.

    Key Value
    Id item()
    Name outputs('Compose')?[item()]?['Name']
    Profile outputs('Compose')?[item()]?['Profile']

    Using, outputs('Compose')?[item()]?['ColumnName/Propery'], we are fetching first fetching the object using index and then passing the name of the property to get its value.

     

     

    Output:

    ManishSolanki_2-1708745159311.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492