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 Apps / How to convert a singl...
Power Apps
Answered

How to convert a single column table filled with comma delimited strings into an N column collection?

(0) ShareShare
ReportReport
Posted on by 30

Good Morning All,

 

Working on a PowerApp that receives a single string from PowerAutomate containing data from a CSV that I ultimately want to turn into a collection for further use within the app. I've been able to split it into a single table containing each record (over 100 rows) that I eventually want to place into a 9 column collection.  This string is comma delimited.

 

{"Column1":"\"DATA\"","Column2":"DATA","Column3":"DATA","Column4":"Data","Column5":"Data","Column6":"Data","Column7":"data","Column8":"data","Column9":"data"}

 

However I am having some difficulty taking each string within this table and transitioning it into a collection. Can anyone point me in the right direction? The searches I've done point me to much simpler tables and I can't quite transpose it to a 9 column table since I don't have a firm grasp on using the tools they used.

 

Any assistance would be appreciated! Thanks in advance!

 

 

Categories:
  • Verified answer
    Arcturos Profile Picture
    30 on at

    EDIT: SOLVED. Stream of consciousness below.

     

    I was able to use REGEX with Match to work on the first string in the table. Where varResponse is the string response from the PowerAutomate flow.

     

    My first test case worked using:

     

    Collect(TestColl, Match(First(varResponse).Value, "\{""Column1"":""\\""(?<Column1>[\w \@\:\/\'\.]*)\\"""",""Column2"":""(?<Column2>[\w \@\:\/\'\.]*)"",""Column3"":""(?<Column3>[\w \@\:\/\'\.]*)"",""Column4"":""(?<Column4>[\w \@\:\/\'\.]*)"",""Column5"":""(?<Column5>[\w \@\:\/\'\.]*)"",""Column6"":""(?<Column6>[\w \@\:\/\'\.]*)"",""Column7"":""(?<Column7>[\w \@\:\/\'\.]*)"",""Column8"":""(?<Column8>[\w \@\:\/\'\.]*)"",""Column9"":""(?<Column9>[\w \@\:\/\'\.]*)\\r""}"))

     

    Now I imagine I just need to figure out the ForAll loop to iterate across all the rows of VarResponse and collect each entry into the TestColl collection. Still working through that piece.

     

    Will post completed solution here once I find it in case anyone else finds it useful.

     

    EDIT:

    After taking a quick break, got it going:

     

    ForAll(varResponse.Value,

    Collect(TestColl,

    Match(ThisRecord.Value, "\{""Column1"":""\\""(?<Column1>[\w \@\:\/\'\.]*)\\"""",""Column2"":""(?<Column2>[\w \@\:\/\'\.]*)"",""Column3"":""(?<Column3>[\w \@\:\/\'\.]*)"",""Column4"":""(?<Column4>[\w \@\:\/\'\.]*)"",""Column5"":""(?<Column5>[\w \@\:\/\'\.]*)"",""Column6"":""(?<Column6>[\w \@\:\/\'\.]*)"",""Column7"":""(?<Column7>[\w \@\:\/\'\.]*)"",""Column8"":""(?<Column8>[\w \@\:\/\'\.]*)"",""Column9"":""(?<Column9>[\w \@\:\/\'\.]*)\\r""}")

    )

    )

    I'm still tweaking the regex to actually capture every row properly as some rows fail the match due to characters not in the original regex (Like the - and ( and  ) characters). But that template will capture the original question in this thread. 

     

    Digging back into the regex rabbit hole since there has to be a better way to capture "any and all sequence of characters" but that is out of scope of this question.  

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 Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard