Jump to content

Line count in text field?


This topic is 1790 days old. Please don't post here. Open a new topic instead.

Recommended Posts

How can I count the amount of lines in a text field? And is there a way to get a live update of the line count while typing in the field without it slowing down or interrupting the typing? 

Link to comment
Share on other sites

What exactly does "line" mean here? If it's a paragraph (a line terminated by a carriage return), then you can use the ValueCount() function. If it's the number of lines created by Filemaker automatically by breaking lines to fit the field's width, then it gets much more difficult if not downright impossible. Why do you need this?

Link to comment
Share on other sites

3 hours ago, comment said:

What exactly does "line" mean here? If it's a paragraph (a line terminated by a carriage return), then you can use the ValueCount() function. If it's the number of lines created by Filemaker automatically by breaking lines to fit the field's width, then it gets much more difficult if not downright impossible. Why do you need this?

It’s a the amount of paragraphs, I need to know this for a story writing program that uses this to keep track of the amount of steps written for a story section. Every step is finished with a carriage return. 

Link to comment
Share on other sites

A paragraph can contain soft returns (linefeeds), where a sentence within a paragraph starts on a newline, while still being part of the paragraph. Paragraphs generally end with a hard return or paragraph return (wikipedia). HTML for instance wraps text in the <p>...</p> tag indicating a paragraph. 

This might help: 

TO count paragraphs using valuecount, you'd first need to replace all the char(10)'s with something else (a space would do) and then use valuecount to calculate the lines.

Edited by OlgerDiekstra
Link to comment
Share on other sites

This topic is 1790 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.