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 / Detect newline in a st...
Power Apps
Answered

Detect newline in a string

(0) ShareShare
ReportReport
Posted on by 1,016

Hi everyone,

Is it possible to detect newlines in a string and possible to count how many there are?

Ex:

"zeftuef

dhfziehfizehf

efzef

zefzefzefz"

should result in 3 newlines.

Someone knows how?

Many thanks,

Ski

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @SkiDK 
    Yes, if I put this text into a label or multiple line textbox...

    "zeftuef
    dhfziehfizehf
    efzef
    zefzefzefz"


    ...I can count the line breaks using this code.

    CountRows(Filter(Split(Label1.Text,""), Result=Char(10)))

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • SkiDK Profile Picture
    1,016 on at

    Hi @mdevaney ,

    Works perfectly. Thank you!

    Have a nice day.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard