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

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

Recommended Posts

Posted

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

Posted

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)

Posted

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

Posted

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.

Posted

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

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 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.