Jump to content
Server Maintenance This Week. ×

Isn't there a syntactical error here?


Recommended Posts

49 minutes ago, comment said:

Why don't you paste these expressions in a calculation window and see if they produce a "syntactical error"?

I did and I get this - what is the meaning, what are they trying to convey using - commas when the obvious would be semicolon - with my localisation with what should be commas etc. 

Skærmbillede 2024-04-20 kl. 19.25.10.png

Link to comment
Share on other sites

I don't understand what you're showing us.

I get no error. And all the commas were automatically converted to semicolons.

Example4.fmp12

 

And in Data Viewer (with the commas):

image.png.0fe1ed6dbad4ec5b6cad419ce9fa30c2.png

 

(That doesn't mean it's a good example.)

 

 

Edited by comment
Link to comment
Share on other sites

Hi Søren!  In your example, two things stand out:

1. Are you saying you put semi-colons in all three places but it changes those within the If() to commas?

2. Aren't you missing a closing parenthesis at the end of your calculation?

Michael's example works for me as well.

Link to comment
Share on other sites

8 minutes ago, LaRetta said:

2. Aren't you missing a closing parenthesis at the end of your calculation?

I am, but in my neck of the woods does this make sense:

GetSummary ( Untitled::Total Sales ; If(Untitled::number of Countries > 1;Untitled::Country;Untitled::SalesZone) )

It was not the actual page, where i saw the error - I referred to, it's in this example consequently either commas or semicolons - and it makes much more sense now.

--sd

 

Link to comment
Share on other sites

It may be worth pointing out that Filemaker does not expressly mandate the use of a semicolon as the separator character between functions parameters.

Although on this page you will find statements like:

Quote

Use a semicolon between parameters when a function requires more than one parameter.

and:

Quote

An ellipsis (...) signifies that you can add more parameters, each separated by a semicolon

the operative sentence seems to be:

Quote

When a function requires more than one parameter, separate individual parameters with a list separator, such as a semicolon. 

There is no explanation regarding what other characters qualify as a "list separator" - but in the glossary you will find:

Quote

 

function list separator

The punctuation character ; (a semicolon) that separates parameters in a function definition. If you type a comma (,), FileMaker Pro changes it to a semicolon after you close the Specify Calculation dialog box.

 


Note also that this is not locale-dependent.

 

Edited by comment
Link to comment
Share on other sites

19 hours ago, comment said:

If you type a comma (,), FileMaker Pro changes it to a semicolon after you close the Specify Calculation dialog box.

Nice thing to know!

--sd

Link to comment
Share on other sites

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.