concrete Posted April 23, 2003 Posted April 23, 2003 i need the date when one certain field in a record is changed when other fields are changed, the date may not change
danjacoby Posted April 24, 2003 Posted April 24, 2003 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
danjacoby Posted April 24, 2003 Posted April 24, 2003 Wups -- forgot one step: Attach the script to the field, so that when a user clicks in the field it performs the script.
cjaeger Posted April 24, 2003 Posted April 24, 2003 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)
djgogi Posted April 24, 2003 Posted April 24, 2003 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
DanSimon Posted April 24, 2003 Posted April 24, 2003 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.
djgogi Posted April 24, 2003 Posted April 24, 2003 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
Recommended Posts
This topic is 7888 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 accountSign in
Already have an account? Sign in here.
Sign In Now