ActualLineCount ( Text ; CharsPerLine )
Determine if text is overflowing field bounds on layout.
Average rating: 4.5 (31 votes) Log in to vote
Jonathan Stark - Show more from this author
Jonathan Stark Consulting
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Have you ever needed to know if data is overflowing the boundaries of the field in which it is being displayed? For example, maybe you want to use conditional formatting to notify the user that they have entered too much text to be displayed on a printout. This can be a tricky thing to determine when data can contain carriage returns.
This custom function will solve the problem for you, with a couple of caveats:
- You need to use a monospace font on the field
- You can not allow tabs in your data because it is impossible to determine where the tab stops are. Since you have to use a monospace font anyway, you can use an autoenter calc to replace tabs with 4 spaces.
- You might want to add a platform check to address font size differences on Mac and Windows.
Sep 3, 2019
|I can't seem to make this work? Could someone check this to see if it's working for you?|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.