ron G Posted October 20, 2012 Posted October 20, 2012 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
comment Posted October 20, 2012 Posted October 20, 2012 A calculation field that uses Get (CurrentDate) needs to be unstored.
ron G Posted October 21, 2012 Author Posted October 21, 2012 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)) StartDateExit ( Script Triggered )script: EndDateExit (Script Triggered) Script: This is the Duration function... (Modified Brian Dunning)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now