web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 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,838 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,838 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard