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

Does anyone know of a way (or a work around) to calculate a field only one time? I really really don't want to use a script or a plugin.

What I want is for a calculation to get performed when a different field changes. But I only want the calculation to get performed once.

What I'm trying to do is have email get generated once a record has been modified one time. The record will get created via the web and then modified via the web. Once that modification has occurred the record won't be touched again. I'm using the SMTPit plug-in to send the mail.

Any ideas? FTR, FMP 5.5 running on Win2k pro, with IIS running as a webserver.

Thanks,

Carrie

Off the top of my head (and I'm not familiar with web-based DBs, so...)

Set up the field as an auto-calc field.

Create a number field, disallow manual entry and hide it (we'll get back to it).

Create a calc field that returns the text "recalculate" if the auto-calc field does not equal what the auto-calc should be (meaning that the field on which the calc is based has been modified), and if the number field is empty (told you we'd get back to it).

Create a script & attach it to the calc field that recalculates the auto-calc field and sets the number field to equal "1" -- but only if the calc field isn't empty.

Now, the first time you modify the "different field", the calc field shows the word "recalculate". Clicking on that field will recalculate the auto-calc field, and puts a "1" in the number field, preventing the calc field from ever showing a value again.

It's not totally automatic, but it might do the trick.

  • Author

quote:

Create a script & attach it to the calc field that recalculates...

What do you mean by "attach it to the calc field"?

Keeping in mind that I'm not familiar with FMP on the web...

In non-web circumstances, you can make a button out of a field -- in layout mode, just click on the field and go to Format:Button.

  • Author

hmm. don't think that'll work on the web, but it's good to know. smile.gif

Create a number field, "Email sent."

Create a field that auto-enters the Mod. Date.

Create a field that is the Creation Date.

Create a field that is a calc: Creation Date = Mod. Date.

Create a script that runs when the record is updated via the web, that checks first to see if Email sent = 1, if so do nothing, else if the calc = 0 (i.e. the dates are different), the script should send your email, and set Email sent to 1.

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.