AndreasvanHaren Posted May 3, 2019 Posted May 3, 2019 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?
comment Posted May 4, 2019 Posted May 4, 2019 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?
AndreasvanHaren Posted May 4, 2019 Author Posted May 4, 2019 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.
OlgerDiekstra Posted May 4, 2019 Posted May 4, 2019 (edited) 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 May 4, 2019 by OlgerDiekstra
Recommended Posts
This topic is 2299 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 accountSign in
Already have an account? Sign in here.
Sign In Now