Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Refresh field calculation....

Featured Replies

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

Unstore the calculation

A calculation field that uses Get (CurrentDate) needs to be unstored.

  • Author

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)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.