Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

how do you know when a record has been altered?


This topic is 7308 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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__

Posted

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.

Posted

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__

This topic is 7308 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.