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.

Help Me With A Simple Calc (Temporarily Retarded)

Featured Replies

confused.gif I should be able to figure this one out, but my brain must be in holiday mode.

Ok, heres the situation. My Prospects file is related to my Sources file. Long story short, I have a variety of calc fields in the Prospects file that return "1" if they evaluate to true. These 1s are counted in the Sources file. One field is called ApptSetDt (the date an appointment is set). I need to be able to count records created in the current month that have apppointment dates in the current month OR records created in the current month that have appointment dates in the next month.

The calc I set up goes like this:

ApptDtMonthCalc=

If ((Month(ApptSetDt) = Month(Status(CurrentDate)) or (Month(ApptSetDt) = Month(Status(CurrentDate)) + 1)) , "1", "")

This calc will evaluate the first part of the statement correctly, but the current month + 1 wont work. I tried modifying the setup a little and putting it in a case function, and I tried isolating part of the or statement, to no avail.

So, what should I do differently? I have a feeling that it will be obvious when someone replies, but right now I'm temporarily retarded. Thanks for the help

Ken

The problem is that this month is December and is month number 12. January is month 1, but your calculation will come up with 13. Best to change it to:

ApptDtMonthCalc=

If ((Month(ApptSetDt) = Month(Status(CurrentDate)) or (Mod(Month(ApptSetDt),12) =Mod( Month(Status(CurrentDate)) + 1,12)) , "1", "")

Since these expressions evaluate to 1 or 0 anyway you could eliminate the If function altogether like so:

ApptDtMonthCalc=

Month(ApptSetDt) = Month(Status(CurrentDate)) or (Mod(Month(ApptSetDt),12) =Mod( Month(Status(CurrentDate)) + 1,12))

  • Author

Aaah.

Ok, so maybe I wouldnt have got it by myself, but it makes perfect sense.

Thanks for the know-how man.

Kn

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.