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.

Plain-text translation of Case statment

Featured Replies

  • Newbies

Hi

Can anyone give me a plain text translation of the following statement from John Mark Osborne's Format.fp3 solution:

Case(Mod Time, Serial, Serial)?

Specifically, I am trying to figure out what it means in a case statement when the test condition does not contain a comparison operator (such as "Mod Time>12:00").

I read it as "If Mod Time has any value, insert the value for Serial into [the field being calculated]; if it doesn't have a value, do the same thing."

I have adapted his solution for replacing unformatted (or incorrectly formatted) text with a formatted version (in my case, dates), but I need it to work on new records automatically. The key appears to be putting something in that test-condition other than a modification time-based trigger, since a new record doesn't have a "modify time."

Thanks for any clarifications anyone can offer.

------------------

The first argument in a Case statement is evaluated as a boolean. It can be a comparison, A <= 5 which evaluates to a 1 or zero, true or false. It can also be a numeric field. Zero values in a numeric field are evaluated as "False" or zero, non-zero values are evaluated as "True" or one.

The variable defined as:

Case(Mod Time, Serial, Serial)

would have the value of the field Serial regardless of whether Mod Time was True or False. John Mark is obviously using some trick here. Without more information to put this in context, I can't guess further. -bd

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.