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.

Featured Replies

Hi all,

I have had a look through the posts and cannot seem to find a solution to this problem:

I am using two date fields within an accounting database. The first field is an autofill defined field, which enters the creation date when a new record is created. The second field is a calculation field that simply generates the date today. I have another field called "days_old" which uses a Case() calculation to work out how many days it has been since the creation date (or my invoice date). This all works fine. The problem I have is I would like to define an additional field that displays a result if the value of field "days_old" is greater or equal to 31 but also less than or equal to 60.

Is this possible? Can anyone shed any light..

thanks

P.

Hello:

Yes this is possible. And with many things in FM there is more than one way to do it grin.gif

What result would you like to display? Either way, the calc would look like this:

Case(Status(CurrentDate) >= Days_old + 31 and Status(CurrentDate) <= Days_old + 60 , "Some Result" , "Some Other Result") ---- You can keep adding conditionals if you want. For example, you may want to show that a date has aged 30 days, 60 or > days, 90, and so on... if you need help with this e-mail me and I can send you more info.

By the way, you shouldn't need a field that calculates the current date, unless you just want to show it on a layout somewhere. But it's not necessary for calculations.

Hope this helped

Ken

Just a brief addendum to Ken's good advice:

1. The calc will have to be unstored in order to refresh correctly, and

2. The 'result if false' parameter for the Case( ) function is optional - so if, as outlined in your post above, you only require that a result appear when the record falls within the calculated range, the "Some Other Result" part of the formula (and the preceding comma) could be omitted entirely.

Hi Ray:

Thanks for the annex.

You know ole Booles' and I don't get along. grin.gif

  • Author

Hi,

I have found the solution to my problem from the advise you have given. Thank you very much!

The calculation I used:

fields:

difference = days since creation_date(or my invoice date).

payment_amount_outstanding = outstanding amount client has to pay.

calculation:

Case(difference >= 31 and difference <= 60, payment_amount_outstanding, "0.00")

This calculation is for a field called 30-61 and simply this field will display the amount outstanding if test1 is a match, or 0.00 if test1 does not match.

many thanks for you help again..

P.

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.