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

I want to define a calculated field that returns a text value based on date ranges.

i.e. if InvoiceDate is after 31/03/2001 and before 01/07/2001, "A" is returned and so on. (I'm calculating which quarter of our financial year the invoice relates to).

Cannot get this to work using either the If function or the Case function

A calculated field definition of

If(InvoiceDate>31/03/2001 and InvoiceDate<01/07/2001,"A","")

returns A for every record.

Puzzled by this one.

Andrew Bruno

Hi, how about these. one is based just on month, the second takes into account the year as well.

If( Month(Invoice date)>3 and Month(Invoice date)<7,"A","")

------

If( Month(Invoice date) >3 and Year(Invoice date) = Year(Status(CurrentDate)) and Month(Invoice date) <7 and Year(Invoice date) = Year(Status(CurrentDate)) ,"A","")

HTH

  • Author

Yes that would work, but I want to identify quarter years for some time ahead and set this in the system.

I've actually solved it this way. As part of the opening script, I set a series of global date fields, g_quarter1, g_quarter2, etc. ( Insert text, anyway, as you can't set this field type !), marking the first day of each quarter.

These global date fields don't appear on any layouts.

My calculated field definition is then

Case(InvoiceDate>=q_quarter1 and InvoiceDate<g_quarter2,"A",InvoiceDate>=q_quarter2 and InvoiceDate<g_quarter3,"B", ........

I've set this up for 4 years ahead. I know I need to ensure that all machines in the network set the same globals.

This calculated field is needed to set up relationships to allow spreadsheet style analyses of sales by product by quarter and sales by customer by quarter. Is there an easier way I'm missing ?

Thanks for the usual prompt reply.

Andrew Bruno

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.