Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

automatically add variable number of hyphens to the end of a text calculation

Featured Replies

  • Newbies

I am currently using one of the layouts in filemaker to print checks.

my check layout has a calculation field that converts the numerical value of the check to a verbal representation of the number ie: $100.56

is translated into One Hundred Dollars and fifty six cents. I will refer to this field as numtranslate from now on.

I would like to create a calculation field refered to as "checkline" from now on, that uses the value from numtranslate and intelligently adds a variable number of hyphens to strike through any remaining white space on the number word line on the check automatically, without having a fixed number of hyphens present so that it does not distort the text printout beyond the constraints of the "Number space"allotted on the check form.

My ideal structure for Checkline would look like a calc field that specifies max characters or variable defined at value maxVar. The field would display numtranslate followed by a variable number of hyphens as specified by the calculation (character count of numtranslate - MaxVar)

so that the end result looks like:

One Hundred Dollars and fifty six cents--------------------------------------------------------------------------

or

Fifteen Dollars and Zero Cents-------------------------------------------------------------------------------------

or

Ten Dollars and One Cent -------------------------------------------------------------------------------------------

I need a little help creating this formula, and would appreciate any help anybody can offer. Thanks

will this work for you?

The problem with declaring value max with is that it is very dependent on the layout and font used, a monospace font and a proportional font using the same calculation will break

in the example provided i'd recommend creating a calc field for known areas where the value is going to be displayed you then know that this field is used for a particular layout & font.

checkText.fp7.zip

a monospace font and a proportional font using the same calculation will break

Or not:

checkText2.zip

Or not:

Very nice, thanks for that one!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.