AnsweredAssumed Answered

Calc Issue

Question asked by MikeMcErlean on Jul 25, 2012
Latest reply on Jul 25, 2012 by MikeMcErlean

This seems like such a simple question, but it is driving me crazy.


I have a script that takes a chunk of text and I want to separate the first line based on the space I have to display it. The rest of the text will display elsewhere, and I don't want missing or duplicated pieces. I set the text into a variable, $theText, and the field lenght into another variable, $fieldLength,


This is complicated because of variable width fonts and existing carriage returns, so I calculate the break point based on the number of whole words that will fit in the space. The problem is the break point caculation.


The failing bit is in the calculation to set the break point. It seemed to work, but then I added the conditions for the carriage return issue, and it hasn't worked since. Removing the newer conditions didn't help.


I've included a screenshot of the calc in my dataviewer to show exactly the issue.


Can anyone explain why this is happening?





FileMaker Advanced 11.04, Mac OSX 10.6.8