Edit Script display truncates after certain TAB characters
Operating system version
Mac OS X 10.8.5
Description of the issue
When viewing the list of script steps that make up a script, the Edit Script window displays a summary view (often a complete view) of what that script step does, without requiring a click on it. Some script steps are truncated with an ellipsis if they have too much information to display. In a specific situation, including a TAB character in a calculation as part of a script step (e.g. Set Variable, Set Field, If) truncates that display without any indication that code is missing.
Viewing your script steps with this bug active can lead you to believe that a calculation is much shorter than it actually is. This bug thus causes problems for developers trying to use whitespace as part of a best practice to make calculations more legible.
Specific situations where this occurs: The script step display is truncated after the first TAB after (about) the 27th character in the calc string when the total length of the calculation is more than about 186 characters. Strangely, the exact TAB cutoff point shifts by a few characters if there is another TAB before that one. The cutoff point also shifts depending on what script step it is. The above is for "Set Variable" and "Set Field." When the script step is an "If" the cutoff is not 27, but rather about 51.
This did not occur in FileMaker 11. In FileMaker 11, tab characters were stripped out in the display list so that neighboring characters were jammed together, but they did not cause following characters to disappear.
Steps to reproduce the problem
Add a Set Variable script step to a script.
Choose a variable name like $testVar
For the Value, use the following calculation (NOTE that there is a TAB character between the 6 and 7 in the third number grouping that was entered by hitting option-tab on a Mac):
"123456789 123456789 123456 789 123456789 123456789 123456789 123456789 123456789 "
& "123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 "
Notice that the Edit Script window shows that entire calculation - you can scroll to the right and see the whole thing, including the closing square bracket.
Now, Duplicate that script step and click Specify on the duplicate, the Specify to edit the Value's calculation.
Edit the calculation so that the TAB character is between the 7 and 8 instead of between the 6 and 7.
Hit OK to save the calculation and then OK again to save the script step.
Notice that the script step display is now truncated after the 7 in that third grouping of numbers, without any indication that the calculation is longer than what is shown. There is no ellipsis, no closing bracket. If the TAB occurred outside of a string to format a calculation for better legibility, there wouldn't even be the hint of an unmatched quote character to indicate the display is misleading you.
Tab characters in calculations should not break the script step display feature.
Using tab characters can break the Edit Script window's display feature, misleading developers about the content of their scripts.
Exact text of any error message(s) that appear
There is no error message, only incorrect display.
None, other than avoiding use of actually typed TAB characters. If you want to include a literal TAB character within a string, you could concatenate Char ( 9 ) into a string. However, that doesn't help with the way this breaks using TABs to format complex calculations as part of a legible code best practice.