Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

patterncount ( Field, "<paragraph symbol>" ) + 1 will count the number of line in a field assuming that each "line" is a distinct element, like in a list or checkboxes or something. Counting the "lines" in a paragraph is near impossible, since the "lines" are simply an effect of the size of the field, the words and the font; very nebulous at best.

Posted

Yup, it's silly. Especially since your 27-line field calculates to -6 lines.

Haven't checked all the scripting yet, but it seems to me that something ain't right.

Posted

Yeah. When I said silly I meant it. It just barely works (but apparently not always) at the limits of Filemaker's print preview accuracy. There is no difference between the Mac and Windows version other than the file compression method.

In theory, you create a layout that has headers/footers so big that the body part has page breaks after every line. You place an exact copy of the field whose lines you want to count on the layout. Then you simply do the trick of going into preview mode and counting pages. When I first thought of doing this, I figured that it should be a piece of cake. Then, when I actually set it up, I found out that Filemaker seems to get very confused when you set up a layout like this, and text starts to skip pages and behave very erratically. I had to play around with it for a long time to get it to work on by computer. So, if you are using this on a different system than what I set it up on, it will require some layout tweaking, and it's possible that it may not work at all.

On the other hand I have used a similar technique to automatically pick a layout that best displays certain field data. In this situation, I have several nearly identical layouts, the only difference being the width and position of the field in question. Rather than shrinking the body part to a single line, you just arrange the field so that if there are too many lines to display neatly, it will flow over to the next page. Again, you go to preview mode and see if there is more than one page. If so, then you try the next layout and repeat until you find one that fits everything onto a single page.

This topic is 8158 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.