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.

how do you know when a record has been altered?

Featured Replies

Hello,

I have a button on my layout which takes the user back to the main form.

I have turned off auto saving of data and do ti all under this button because the validations in the fields sometimes trigger in a field which my user is not in.

so, my plan is to detect if the record has changed under the button in a script. If the record has been edited or is new, then Validate it, if not, my user is only viewing it, so just go to the the other view?

is this possible to do ?

I took a look at the Get() functions and none of them seemed to fit the bill.

thanks in advance,

sincerely,

J__

If you have a field, type 'TimeStamp' set to auto-enter the modification timestamp you can store the value in a global as they enter the field and compare it to the field when they exit the field.

But you could validate it always, right? if the user is just viewing the data then the data was entered and validated earlier. Validating it again should produce no errors. That saves you a couple of lines of script and at least one field.

  • Author

Hi,

thanks for the response.

I have quite a few fields - probably 7 that I need to validate. Copyng to a globals I had considered and then checking them, but wondered whether there was a more simpler approach -

like maybe a function called Get(EditState)

if editState = 1 then new record just created.

if editState = 2 then edited record.

guess not.

copyng the record /fields sounds ok and I did ponder that a little, but wondered if there was a more streamlined way....

but I still don't know if I am in edit mode yet, so how do i know when to copy the fields? Perhaps it's that I always copy them whether the user is viewing them or editing them - then when they leave the layout to go to a different view of a different table, I can check if any fields have changed, if the user edited the record, then my check will show that a field is not the same, so I can then run my validation and only then. Sounds viable.

thanks,

J__

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.