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.

Check expression syntax

Featured Replies

Hi all,

I am looking for and idea to check an expression syntax off-context.

I've been very disapointed by the fact that EvaluationError gives priority to runtime errors (missing field...) over syntax errors, and even more disapointed by isValidExpression which just seems to be a sub-EvaluationError (unlike its documentation, it is also sensitive to runtime errors)

Still looking for an idea...

You might cover loose ends by this:

http://www.aptworks.com/cgi-bin/calc_formatter_2v5.cgi

--sd

The question is little too wide to be answered by "do this or that". In general, I would say that if you know which fields may be missing, you can assign them arbitrary values by using the Let() function around your expression.

  • Author

The point is to allow a user to type an expression (within a FileMaker database), and give a feed-back if there is a syntax error (missing parenthesis, too many parameters...).

I am not interested in the runtime error (missing field, unrelated table...), because I want to be able to check this off-context. Any unknown string should not be analysed, just like variables (isValidExpression wouldn't mind if a variable used in the expression wouldn't exist)

Is it more clear this way ?

Thanks

Edited by Guest

Is it more clear this way ?

Not really, because the context is unknown. I understand that you don't care about runtime errors - but Filemaker does. So I don't see a way other than to remove runtime errors from the expression.

So it comes back to this: is the user allowed to refer to ANYTHING in this expression? Or can there be a list of fields/variables that may not exist from the point-of-view of the EvaluationError(), but should be allowed anyway?

Any unknown string should not be analysed

That is not as simple as it sounds. For example, Filemaker makes a distinction between an unknown string such as "xyz" (Error #102) and "xyz(" (Error #1208). This is useful for flagging misspelled function names, as opposed to missing fields. Removing ANY unknown string wholesale would not be beneficial in such case. And what about quoted strings and comments?

Edited by Guest

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.