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 am looking for a way to get a Auto entered serial number to reset everyday? Any help would be great. I would like for it to go back to 01 at the first record everyday.

If you have version 5.5, you can do this with a opening script. You will need a global date field "gDate" and I called your serial number field "serial". Set this script to run when the file opens. You will also need to enter an initial date into the gDate field.

The script as follows:

File Open:

If["gDate=Status(CurrentDate)"]

Exit Script

Else

Set Field["gDate","Status(CurrentDate)"]

Set Next Serial Value["Serial",""01""]

End If

It's the getting it to "reset every day" part that is going to be tricky. If it's a single-user database the task is easy, and a simple startup script as slstrother suggested is fine.

If the database is multi-user then the task is going to be difficult. Because of the way global fields work (each guest's values are independent and don't necessarily update the main database value) the script will reset the serial number every time the database is opened by a guest.

In this case a solution will be to replace the global field with a "preferences" file field. A prefs file is a database with only one record that is globally related to all records. Because it's a real field in a real record any changes are permanently remembered for all users immediately.

  • Author

Yes Vaughan, it is a multiuser database and it is always running. I am still kinda confused on how it will know when the date has changed and that it will know when to reset the serial number value. If I set a "preference" file field will it take care of that problem? Any help on this would be great.

Can you get away with closing and re-opening the files on the host (for a few minutes) :

If so you could, for FMP hosting, run Vaughans script on start up, or, for FMServer hosting, schedule a recalculate today which would also run Vaughans script when the files are opened locally.

How about...

MAC

Use iDoScript to schedule a DB open to reset the serial value at midnight.

WINDOZE

Use Task scheduler to do the same

  • Author

I am running it on filemaker server 5. I am trying to get away from having to do anything on it daily. If I have to do anything daily on it then i might as well just reset the serial value to 01 everyday. This is kinda of a new area for me on FM so thanks for any help.

  • Author

I have thought about trying to use a apple script and I just downloaded the I do scheduler on tuesday. Any ideas on how I would set up that script to reset the serial value??? I thought I had read somewhere that you can't get apple script to define field values. I don't care what method I have to go about to get this to work..... as long as it will work with out me having to manually work on it everyday. Thanks

Take the easy route...

Write an AppleScript to fire up a FMP file.

Set the startup script to perform the necessary action in FMP

Close the FMP file

Job done

  • Author

Filemaker and scripting are not my strong point. Any help on how that startup script would go?:

If you're on FMServer then you also have the option to schedule a "Recalculate Today".

This will close all open file in FMServer

Then opens all those file in FMP (results in "Today" recalculation)

This gives sopportunity to have a FMP file execute the necessary actions to modify the serial value (refer back to Vaughans post).

This comes back to the issue of "keys with meaning" that LiveOak and Ocean West have mentioned in the past. The best keys have no meaning. Now I know why.

Kill the idea completely. Live without them.

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.