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.

Scripting Follies of a newbie

Featured Replies

Greetings -- I'm looking to delete a specific set of charachters from a field in about 2000 records. I've tried writing a script to do this, but can't get it down, can anyone help??

Field is a date field and has "0.00" which I'd like to remove but leave the date before it alone completely, field looks like "01/01/01 0.00"

I'm trying the substitute function, but keep getting errors while trying to write it.

Any assistance would be a start.

left(datefield, 8) should work, if the months and the days always have leading zeros.

Make the datefield as text field first!

Gerd

[ January 31, 2002: Message edited by: Gerd Muller ]

It must really a *text* field.

  • Author

unfortunately the date format varies, would there be an easy to account for this??? something like:

if char 8 = 2 then Left(datefield,8) else

:??

LeftWords(datefield, 1).

As said: datefield has to be a *text* field.

Gerd

Sorry what I meant to say above was this:

You have used a text field to store date information, that's why you are having so much trouble. Always store date information in date fields because FMP (and you) can work with it so much easier.

If the field is a text field and the date portion is always followed by 'space plus 0.00', the following should work for different lengths of the date portion;

Left (Datefield ,Length (Datefield-5))

quote:

Originally posted by Korky:

If the field is a text field and the date portion is always followed by 'space plus 0.00', the following should work for different lengths of the date portion;

Left (Datefield ,Length (Datefield-5))

...or use Substitute(Datefield, " 0.00", "")

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.