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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How do I convert an CSV object into a coma-separated array?

(0) ShareShare
ReportReport
Posted on by

Dear Forum Members,

 

Can anyone please help me? I am going nuts already! 😭

This may be easy, but I have gone through a zillion different posts and tried at least 10 different ways to resolve this without success... 

I have a spreadsheet with existing entries and serial numbers. I got my flow to append new lines to it, and every time a new line is added, I want my flow to append a serial number to it. Apart from this flow, there also is another one that adds lines to this sheet, so I can not simply hard code the next number into my flow. What I need is a method that reads out the actual number and adds one to create the upcoming one. I already solved the first half of my workflow (the reading out the actual number part), I have the actual numbers in an Object (that was created from a JSON with Create CSV function), what I would need now is to convert this multiple lines object (CSV table) into an array separated by semicolon, because I would like to define the highest value (with MAX function) to be able to add one to it.

I couldn't so far find a solution to split my multiline object into an array. The input looks like this:

SalvadorBali_1-1683899934209.png  SalvadorBali_2-1683899975141.png

 

I already had several attempts with split / take, etc. functions. This is the last attempt I had:

SalvadorBali_3-1683900522561.png

 

Although the flow was successful, the output is not really what I wanted:

SalvadorBali_0-1683897174637.png

 

I believe that the variable is now a string (I converted it).

 

Can you please recommend a way I could split this into a comma-separated array?

 

Thank you in advance!

 

Regards,

SalvadorBali

I have the same question (0)
  • lbendlin Profile Picture
    8,361 Super User 2025 Season 2 on at
    Re: How do I convert an CSV object into a coma-separated array?

    Not very clear what you are trying to achieve. Can you not use the standard actions to add rows to an Excel table  (rather than trying to add lines to a sheet)?  

  • wskinnermctc Profile Picture
    6,519 Moderator on at
    Re: How do I convert an CSV object into a coma-separated array?

    I agree with @lbendlin it seems like you are doing a lot of extra work. 

     

    You can use a List Rows in Excel to get the last row. Then do some formatting to get the serial number from that last item and add 1 to put in your new item.

     

    I also want to add that if you have multiple flows changing an Excel sheet AND you want it to be numerically incremented, you are going to have an issue if these flows run without a substantial delay in between. 

     

    Why not use a SharePoint list? It would help with keeping things organized and allow multiple flows to easily use it without errors.

  • Community Power Platform Member Profile Picture
    on at
    Re: How do I convert an CSV object into a coma-separated array?

    Thank you for your comments @lbendlin and @wskinnermctc . I may as well be overcomplicating, but I couldn't find a standard solution to append numbers to rows when they are added (mind that this entire worksheet is not directly connected to my Form, this is created in the background in Excel online from data coming from my form). Besides, as I mentioned, there are two flows that (should) add rows hence append a serial number. The third factor due to which I thought I need a bespoke solution is that I only have (an increasing) serial number in every second line, ie. my flow(s) add 2 rows at the same time, one should have a serial number, and the other row doesn't (this is because I am building a specific template which is given by the service where I am using it). In practical terms it means that every second line in my column is empty.

    Do you know any standard solution that responds to my need, ie:

    1.) to examine the number of the last row added, and increase it by one?

     

    I tried many thing, includig using the simple rowID column from my Excel, but I couldn't handle it, as being an Object type variable. If you have any simple idea, please do let me know.

    I hope I explained more clearly what I am after.

     

    Thank you!

  • lbendlin Profile Picture
    8,361 Super User 2025 Season 2 on at
    Re: How do I convert an CSV object into a coma-separated array?

    Oh you will have so much fun with this and the concurrency implications. For example - what should happen if someone deletes the last row with its assigned serial number  and someone else adds a new row?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard