Jump 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.

Featured Replies

I have a total newb question...

 

I'm trying to use TrimAll function. Where do I actually place the syntax trimAll(... etc. ??

I'm guessing I have to make a new script but then what do I choose in the left column of the Edit Script box?

 

Sorry but I'm somewhat lost and thanks for suggestions

Functions are used in calculations, i.e. in the Specify Calculation dialog – which appears in field definitions, script steps, field validations … basically everywhere where a result can or must be calculated.

 

I'm guessing I have to make a new script

 

What exactly are you trying to achieve?

  • Author

ohhh... Thanks for clarifying it.

 

I have a field which will carry a numeric value. I need it to automatically:

– remove all spaces in input

– remove all dashes in input

...those 2 above is what I intended to use the TrimAll for. (I thought that triggering a script on field exit was the way to do it)

– be exactly 14 digits; if input is shorter, leading 0's will need to be added automatically to fill 14 digits

I have a field […] I need it to automatically:

[…]

 

Then check out the auto-enter calculation :laugh: option in field definitions. 

  • Author

by "automatically" I meant "have FileMaker fix user input", sorry for not being clear

I'm guessing I need to specify the calculation in Validation then

by "automatically" I meant "have FileMaker fix user input", sorry for not being clear

I'm guessing I need to specify the calculation in Validation then

 

You were clear, and so was I. Validation will alert you to validation violations, but it will not “fix user input“.

 

Did you take a look at the auto-enter calculation feature, how it works and what it can do?

I have a field which will carry a numeric value. I need it to automatically:

– remove all spaces in input

– remove all dashes in input

...those 2 above is what I intended to use the TrimAll for.

 

TrimAll() will not remove any dashes in the input. Perhaps you should consider something like =

SerialIncrement (  "00000000000000" ; Self )

Given an entry of "23-56  70", the above will return "00000000235670". Make sure the target field is of type Text.

 

To fix user input automatically, use the auto-enter calculated value (replace existing value) option - not validation.

  • Author

I started looking into Filter functions and it did half of what I needed. Your suggestion, Comment, worked perfectly though.

Thank you both. Learned a thing or two today

Create an account or sign in to comment

Important Information

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

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.