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 / Multi column table fro...
Power Apps
Answered

Multi column table from single column table

(0) ShareShare
ReportReport
Posted on by 1,207

I would like to put the result of a split operation a comma separted string into a two column table.

 

At the moment my table has the following structure:

 

RESULT
Property 1
Value 1
Property 2
Value 2
Property 3
Value 3

 

I would like it to be:

 

PROPERTYVALUE
Property 1Value 1
Property 2Value 2
Property 3Value 3

 

 

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Digital ,

     

    Could you please share the whole formula that created the result table?

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Digital Profile Picture
    1,207 on at

    @v-jefferni ,

     

    It's a big mess with lots of nested string operations. The string comes from a SharePoint column that contains unstructured data that I need to get into individual columns in another list.

     

    I thought if I have it in a nice collections I can easily reference to patch to the new list.

     

    With(
     {
     w_String: PlainText(
     Substitute(
     Substitute(
     Substitute(
     Substitute(
     Substitute(
     Substitute(
     ThisItem.'Task Summary',
     "<span style=" & Char(34) & "font-size&#58;1.0em;" & Char(34) & ">",
     ":"
     ),
     "</span>",
     ":"
     ),
     "VEHICLE DISPATCH DETAILS",
     ""
     ),
     "Expected Arrival",
     ",Expected Arrival"
     ),
     "-",
     ""
     ),
     "::",
     "NULL"
     )
     )
     },
     Trim(
     Substitute(
     Substitute(
     Mid(
     w_String,
     Find(
     "Hubodometer Installed",
     w_String
     ),
     Len(w_String) - Find(
     "Hubodometer Installed",
     w_String
     )
     ),
     ": :",
     "NULL"
     ),
     ",Expected Arrival",
     "Expected Arrival"
     )
     )
    )

     

     

  • Verified answer
    WarrenBelz Profile Picture
    156,754 Most Valuable Professional on at

    Hi @Digital ,

    I felt like a bit of code on a Saturday Afternoon - try this as the Items of a Gallery

    With(
     {
     wNos: 
     ForAll(
     Sequence(CountRows(YourTable)),
     Patch(
     Last(
     FirstN(
     colSort,
     Value
     )
     ),
     {RowNo: Value}
     )
     )
     },
     With(
     {
     wSort1: 
     RenameColumns(
     wNos,
     "RowNo",
     "Row"
     ),
     wSort2: 
     Filter(
     wNos,
     Mod(
     RowNo,
     2
     ) = 1
     )
     },
     RenameColumns(
     AddColumns(
     wSort2,
     "Value",
     LookUp(
     wSort1,
     Row = RowNo + 1
     ).Result
     ),
     "Result",
     "Property"
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Digital ,

     

    I made a simple test with this scenario:

    1\ col1 as my source table with two lines of string contains a comma:

    vjefferni_0-1627890461157.png

     

    2\ OnSelect of a button:

     

    Clear(col2);
    ForAll(
     co11 As C,
     Collect(
     col2,
     {
     Property: First(
     Split(
     C.Value,
     ","
     )
     ).Result,
     Value: Last(
     Split(
     C.Value,
     ","
     )
     ).Result
     }
     )
    );
    ForAll(
     col2 As F,
     Collect(
     col4,
     {
     Property: F.Property,
     Value: F.Value
     }
     )
    );

     

     

    3\ Result table col4 would be:

    vjefferni_0-1627892515118.png

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Digital Profile Picture
    1,207 on at

    @WarrenBelz ,

     

    That's so awesome of you. Thank you.

     

     

     

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