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

Featured Replies

Two problems I would really appreciate help with:

I have lots of date fields, some are before today, some after. I want to have a field that will calculate and display the next date after today, and another field that will calculate and display the last date in the list prior to today. The two closest dates to today's date in two separate fields.

A second problem is that I have two start dates for a project. I have a calculation that looks at these dates and works out a Due Date 90 days ahead for each of them. I only display the later date. The problem is that if those start dates have not been entered (the fields are empty) the calculation is still done and the Due Date displays a 7 or 8 digit number. I want the Due Date field to remain blank if the start date(s) have not been entered.

Help please!

Edited by Guest

... We need to know more about your data structure, from the way you make it sound, all your fields are in the same table, this will make your life a lot harder.

For the second one, just add...

If(not IsEmpty(your datefield) or not IsEmpty(your second datefield) ; Your main calc)

  • Author

On the first problem, yes the fields are all in the same table. How does that change things? It should be a simple fix, telling the calculation to display the next date after the current date? Or the last date before the current date?

In the second problem, I tried putting the suggested fix into the calculation I already had, but it then tells me that functions are needed, or wrong, and it will not work.

Here are the calculations, could you please look at them and maybe try them to see where the problem is?

My calculation:

If (Eval Completed CFIT;Eval Due CFIT-Eval Completed CFIT;TextColor (Eval Due CFIT-Get(CurrentDate);RGB(0;0;255)) )

Suggested fix:

If(not IsEmpty(your datefield) or not IsEmpty(your second datefield) ; Your main calc)

Combined:

If(not IsEmpty(EvalCompCFIT) or not IsEmpty(ReEvalCompCFIT) ; Eval Completed CFIT;Eval Due CFIT-Eval Completed CFIT;TextColor (Eval Due CFIT-Get(CurrentDate);RGB(0;0;255)) )

Thanks for the assist..

Edited by Guest

... no your main calc should be "If (Eval Completed CFIT;Eval Due CFIT-Eval Completed CFIT;TextColor (Eval Due CFIT-Get(CurrentDate);RGB (0;0;255)) )" not just "Eval Completed CFIT;Eval Due CFIT-Eval Completed CFIT;TextColor (Eval Due CFIT-Get(CurrentDate);RGB (0;0;255)) "

As for your first problem, how many fields in total because i'm a bit confused.

  • Author

I tried the suggestion, and the calculation was accepted, but the result still showed the number of days remaining from year 0001. I want the field to be blank if the two fields that are the basis for the calc are empty. Any further tweaks I can try?

This is the calc:

If(not IsEmpty(${2ndAnnual completeSafety}) or not IsEmpty(${2ndAnnualDue Safety}) ;If (${2ndAnnual completeSafety};${2ndAnnualDue Safety}-${2ndAnnual completeSafety};TextColor (${2ndAnnualDue Safety}-Get(CurrentDate);RGB(0;0;255))))

Thanks, Glen.

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.