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 / Splitting string into ...
Power Apps
Answered

Splitting string into multiple columns

(0) ShareShare
ReportReport
Posted on by 35

Hello all,

I have an issue with splitting a string into multiple columns. 

https://www.youtube.com/watch?v=sj-UDq8Iuow&t=221s for reference i basically want the same result as in this video by using the split function in PowerApps

First of i made a collection containing one column with records from DepartmentKey in the table Dim.Department

NicoPet_0-1683729213843.png

 

The records in the collection is displayed as; DepartmentCode||Company||Entity. What I want to achieve is extracting Department and Company and split them out into two separate columns. 

Below is the code i used where, in this example right here, I am only trying to extract Department. The syntax is the same as in the linked video, however it seems the syntax since has been changed or updated, because "result" is no longer recognized by PowerApps. Instead, it want me to use "value" which at first glance seem to work but when looking at the collection table it shows table icons instead of the Department code record. Clicking at one of the records I am able to see the correct Department Code, its just that it returns these table icons for some reason.  

NicoPet_1-1683729283382.png

I hope this makes sense to someone and they can solve my problem

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @NicoPet ,

     

    Please try:

    ClearCollect(
     colDeptSplit,
     AddColumns(
     colDeptKey,
     "Dept",
     Index(Split(DeptKey,"||"),1).Value,
     "Company",
     Index(Split(DeptKey,"||"),2).Value,
     "Entity",
     Index(Split(DeptKey,"||"),3).Value 
     )
    )

     

    Best Regards,

    Bof

  • NicoPet Profile Picture
    35 on at

    @v-bofeng-msft 

    Thanks to the code you provided it correctly extracts the Department Code and splits it into a new column without showing it with these table icons. Though it does not do it for company and entity. Do you have any idea how to update the code so it also extracts the other two?

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @NicoPet ,

     

    The formula should work if the Deptkey is in 'DepartmentCode||Company||Entity' format . Could you please show me a sample?

     

    Best Regards,

    Bof

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard