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

calculation trouble

Featured Replies

I am trying to make a calculation to detect the word Monthly anywhere in a text string.

current calculation will only detect it by itself not mixed in with other words.

If(memo="Monthly";1,0)

Thanks

Hi, swf. Try instead:

PatternCount ( memo , "Monthly" )

This will tell you the total number of times that word appears in that field.

HTH,

Jerry

  • Author

If (PatternCount(memo,"Monthly")>0;1,0)

Does that look right. If it finds it more than 0 times it will return a logical 1.

I will try. Thanks

True; but FM also recognizes any number greater than zero as "true." Thus, if this calc finds "monthly" twice, the expression i wrote still evaulates to "true."

It's a very minor point, but people on this forum (like -Queue- and comment) will jump all over you if they find extraneous stuff in your calcs. wink.gif

J

I don't recall jumping all over anyone, but hey, I like having a reputation! bigglasses.gif

  • Author

Thank you, the last part I had never heard of. I have a follow up question.

I have a field that is lookup field. I want it to look up one place if Monthly=1 and another place if Monthly=0.

Example if it is a monthly meeting (monthly=1) then it will lookup the employee who is permanently assigned to the account.

If it is a regular meeting (monthly-0) it will lookup the employee based on a schedule of days and which employee is on duty.

For shame, Jerry. I resemble that remark! wink.gif

If you need an exact boolean, not not PatternCount( ) (or not not Position( ), which is faster when testing large text fields) converts any result > 1 to 1.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.