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.

change date of field

Featured Replies

i need the date when one certain field in a record is changed

when other fields are changed, the date may not change

A quick idea:

Disallow entry into the field (trust me)

Create a script that:

Sets a [new] global field to the contents of the field

Goes to the field

Pauses (so the user can make the change -- they'll be able to)

Compares the field to the global field to determine whether to update the date field

Wups -- forgot one step:

Attach the script to the field, so that when a user clicks in the field it performs the script.

using a stored calc:

if(field_to_be_watched;Status(CurrentDate);fStatus(CurrentDate)) should do..

If not, create a self relationship based on serial number & Left(field_to_be_watched;0) and auto-enter a reference to a unstored calc fied containing status(currentDate)

The problem with this implementation is that condition in if statement could easily evaluate to false even if field_to_be_watched has been changed.

For ex if it is numeric field than changing it to 0 would not trigger the update, also if it is the text field than changing it to something starting with chars 'n' or 'f' would produce the same result.

Instead you'll need to implement more robust version of the same principle

dateField=case(IsValid(field_to_be_watched);Status(CurrentDate);getField("dateField"))

In this case dateField must be storable (you don't have to turn storing on, however) otherwise (if ield_to_be_watched is an unstorable field :global, related or unstorable calculation; FM will CRASH.

Dj

For ex if it is numeric field than changing it to 0 would not trigger the update

I try this here in test file with number field, but it does seem to work like cjaeger says -only of the field is null it doesn't capture the date.

Yes you're right .

It was leading "f" in

if(field_to_be_watched;Status(CurrentDate);fStatus(CurrentDate))

that made me think he was using some other field for false statement, even it was obviously an status function.

Sorry, my error

Dj

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.