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

Refresh field calculation....


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

Recommended Posts

Posted

I am using FM 12 Adv

I have 3 fields:

[startDate] [EndDate] [Duration]

Duration is a calculated field that subtracts StartDate from EndDate and if ENDDate is blank, substitutes get(CurrentDate). This works.

Problem: If [startDate] = October 20, 2012 and [EndDate ]="" then Duration = 3 days ... ok ( [EndDate] uses today's date.)

But, when I start the program tomorrow, it still shows 3 days when it should show 4 days.

Question: "Is there a way, withouot creating a layout with the 3 fields and looping through them to update them, to 'refresh' the calculation? I have tried going to the layout and doing a 'refresh window' and 'commit record' but ti doesn't work.

Thanks

Posted

The unstored idea works great... IF the duration field holds the unstored calculation and there is no error trapping in related scripts.

For example, I use the following On Exit script trigger scripts to do some error checking and I assign $$ variables to be used instead of field names. This works. But, when I set the clock ahead 10 days, and then start the app, I get this: (Notice the ? at the end. Plus, when the EndDate is empty, it is supposed to substitute get(CurrentDate))

post-72145-0-03425100-1350798939_thumb.j

StartDateExit ( Script Triggered )script:

post-72145-0-00625900-1350798923_thumb.j

EndDateExit (Script Triggered) Script:

post-72145-0-83433300-1350798931_thumb.j

post-72145-0-11630100-1350801725_thumb.j

This is the Duration function... (Modified Brian Dunning)

This topic is 4416 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.