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 / Increment a variable i...
Power Automate
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

 

Categories:
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 307 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 127

Last 30 days Overall leaderboard