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 : /eIW++dohOGmjSk3e2rId1
Power Apps - Building Power Apps
Answered

Splitting string into multiple columns

Like (0) ShareShare
ReportReport
Posted on 10 May 2023 14:39:57 by 29

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

I have the same question (0)
  • v-bofeng-msft Profile Picture
    on 12 May 2023 at 01:11:29
    Re: Splitting string into multiple columns

    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

  • NicoPet Profile Picture
    29 on 11 May 2023 at 13:17:37
    Re: Splitting string into multiple columns

    @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?

  • Verified answer
    v-bofeng-msft Profile Picture
    on 11 May 2023 at 01:40:42
    Re: Splitting string into multiple columns

    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

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…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 982 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 396 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 356

Last 30 days Overall leaderboard
Loading complete