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 / I want to create a Pow...
Power Apps
Answered

I want to create a Power app splits comma separated value to new line, I have created an app also attached screenshot for the same but not sure how to use split function and where to use it?

(1) ShareShare
ReportReport
Posted on by 15

My input:
1123 , 234 , 12376, 9876

My output:
      ID
  1123
  234
12376
 9876
not sure

Capture1.PNG
Capture2.PNG
Capture3.PNG
Categories:
  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @ank3 ,

     

    If this is what you want:

    Ethan_R_0-1685895687798.png

    Then use the following code in your Textbox where you want to display the items in different line

     

    //Here, TextInput1 will contain 123,345.... so on values
    
    //This will be in Label or Textbox where it will go in next line
    Concat(Split(TextInput1.Text, ","),Value,Char(10))

     

     

    Note: The spacing in your separation will also be considered in new line

     

    Hope this helps

  • ank3 Profile Picture
    15 on at

    for saving I'm using this: (can we edit in this itself)
    ank3_1-1685943720045.png

      
    for patching I'm already using this: (can we edit in this itself)

    ank3_2-1685943763392.png


    this is my collection: (can we edit in this itself)

    ank3_3-1685943796857.png


    Now can you tell me which step I need to modify to split the above text

  • Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @ank3 ,

     

    I'm confused as why you used OnStart and OnChange 

    But what you can do it,

    //For Save Button
    
    Patch(
     DataInput,
     ThisItem,
     {
     Name: Concat(Split(txt_ID.Text, ","),Value,Char(10))
     }
    );
    Collect(Table1_1, DataInput);

     

    Hope this helps

  • ank3 Profile Picture
    15 on at

    I basically want to add the data to new cell (every comma separated value to new cell in excel/sharepoint - attached screenshot below), and the above formula does not serve the purpose.

    ank3_0-1686028138021.png


    I'm getting error while using the above formula (attached screenshot below for reference):

    ank3_1-1686028464687.png

     

    Could anyone please help!!
    Thanks in advance for help.

  • ank3 Profile Picture
    15 on at

    @Ethan_R could you please reply?

  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @ank3 ,

     

    Can you try the following code?

     

    ForAll(
     Split(TextInput1.Text, ","),
     Patch(
     DataInput,
     Defaults(DataInput),
     {
     Result: ThisRecord.Value
     }
     )
    )

     

     

    Hope this helps

  • ank3 Profile Picture
    15 on at

    thanks for the reply it is working now

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