Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6133 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted (edited)

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
Posted (edited)

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

This topic is 6133 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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