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've looked thru the entire book I have and tried everything I can think of, so now I will ask the wizards here.

How do verify data integrity prior to storing it in a db?

One of my biggest headaches right now is that this application will accept any date from year 0001 to 3000. BUT I want to limit it to say 1 year with no later than today.

I see how to make a time frame but not a ROLLING time frame.

  • Author

Let me add that I have tried doing the script verification with <= TODAY and that did not work. I still can enter dates greater than today.

You can set a validation calculation in the Field Definition for the date field.

dateFieldName ? Status(CurrentDate)

something like that should work, where dateFieldName is the name of your date field.

  • Author

Well, I finally figured out the problem was I was not putting in the field name.

(DOH)

Anyway, what I finally did was make the calculation like this:

DateField >= Today - 365 AND DateField <= Today

Works great.

sorry about the error in the formula. I didn't realize the less than or equal to character on my mac wouldn't transfer properly

Hey Reed,

That is the way they will look when you paste them in, unless you use the Instant Greamlins in the "Reply To" area by substituting them ( less.gifgreat.gifnotequal.gifpar.gif in your post instead.

The Forum supplied these recently to cover just this problem.

Lee

You're well advised to replace "Today" with Status(CurrentDate). It's faster, and won't give you a problem if the database remains open past midnight. "Today" does not get refreshed.

Steve

  • Author

Okay, I'll change it. Tho I do have a script to shut it down and do a backup everynight just before midnight. Why ask for trouble?

Steve,

How do you accomplished running a script at midnight? Are you using any plugin?

CarlosH

  • Author

No. I have a batch file that shuts down the server and then xcopies all the files to the backup location then starts the server and application back up.

The FileMaker book says to just PAUSE the server but I never got that to work so did a shut down. Works fine and it allows for the "TODAY" calculations to be done.

This reply might be a little late, but Avida911 asked how to run a script at midnight.

Troi makes a plug-in called Activator. In an open solution, this plug-in allows you to schedule scripts to run at certain times.

It's not the easiest plug-in to work, but it gets the job done.

ken

"Works fine and it allows for the "TODAY" calculations to be done."

It would be best if you never use the TODAY function when developing for FM server. Replace your Today functions with Status(CurrentDate)

  • Author

smile.gif That is good advice. If I see the $#@#&$@ who wrote this app, I'll tell him.

Of course I have to wonder why TODAY is in there if it shouldn't be used?

RE: Of course I have to wonder why TODAY is in there if it shouldn't be used?

Backward compatibility. Since "Status(CurrentDate)" is there frequent remarks and recommendations where made to TODAY being deprecated.

For larger networks or customer with budget I will not use plugin, but single computer, which is running execution script in Loop.

Then other users on the network add task -- new record -- to be run. The loop checks for any new tasks and if requested running time is empty, it is running the task immediately. If there is time (date) it compares the time and if current time is greater, it executes the task.

This is more reliable, than any plugin. We tried plugins, but if previous task didn't finished, anything can happen.

  • Author

"but if previous task didn't finished, anything can happen."

How true. Always know what will happen to the system if something breaks.

I think that was rule #6 of the Programmers Laws way back when.

Thank you very much for help. I needed this.

Something about the Today function: it's not enough just to stop and start FM Server. The file has to be opened in FMP as the host to recalculate the Today function.

  • Author

That's something I learned too. I have changed all TODAY functions over and the whole app starts up much quicker now since it doesn't have to do all the TODAY calculations when it first opens.

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.