Brian Dunning's FileMaker Custom Functions

SizeMask ( Text ; IdealSize ; Increment ; CharSpace )

Mask text to insure it fits in a given space

  Average rating: 4.5 (29 votes) Log in to vote

Peter Vinogradov   Peter Vinogradov - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
SizeMask (EmailAddress ; 10; 2; 20)
  Sample output:
mylongemailaddress@goesforever.com

(in a 2 point font)

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Useful particularly for form outputs where you want text to conform to certain width without breaking to a new line. Notes:

IdealSize - should be specified in the font point size you want most masked items to appear.

Increment - specify how much to shrink the font by when text runs over the specified width. A lower "Increment" will trigger more drops in font size, but makes optimum use of space and the drops will be less radical.

CharSpace - specifies the width you are trying to constrain to, expressed in number of characters.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: