Jump to content
Server Maintenance This Week. ×

Really strange problem with a file - calculations being converted to text strings?


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

Recommended Posts

I can't set a field with a calculated result in a particular filemaker file.

 

If I set a field with a calculation of something like 4 + 4, filemaker converts the calculation to "4 + 4"... a text string... it puts inverted commas around the calculation!

 

Weird...

 

here's a movie of it happening...

 

www.smartproof.com.au/filemaker_weird.mov

 

Surely I'm missing something... this can't be a corrupt file can it?

 

It works fine in a brand new file.

 

Anyone else seen this behaviour?

Link to comment
Share on other sites

Look VERY carefully...

 

You are using a comma as the argument separator in the LeftWords functions, whereas it should be a semi-colon as you have used in the MiddleWords function. (although it should work)

 

You also pasted the calc so it could be carrying hidden characters.

 

Try entering the calc using the function list.

Link to comment
Share on other sites

Notice also that Leftwords is not being changed to LeftWords, but that is a result of it being quoted. Unfortunately your video stops before save the calc after removing the quotes.

Link to comment
Share on other sites

Hi guys and thanks for looking.

 

Yes I pasted it, but just to speed up the video. Typing it has the same result. I often use commas as a habit from years of coding before semi colons were used in FileMaker.

 

Am I going mad? Are you telling me that if you use commas it does that? That would mean I've not used commas for a long time because I would have noticed this happening before. I'm 100% sure (although now not 100% I suppose!!) that you can use commas and FM just changes them to semi-colons.

 

My poor brain.

Link to comment
Share on other sites

FM12 will convert commas.

 

Does this occur with any field in Inventory?

 

Try creating a new field Inventory::Test Bar Code and see if you can enter the calculation there with a new script. 

If that works, try to edit the existing script to set Test Bar Code with the formula.

 

If the first works, but not the second, recreate the existing script from scratch (suspected corruption in script).

 

If none of the above works, my guess is a corrupted file.

Link to comment
Share on other sites

It is definitely file-specific.

 

I created a new file, did exactly the same thing (using commas) and filemaker substituted all of them for semi-colons.

 

So I'm definitely not losing my mind.

 

I've never seen a corruption issue where filemaker will do this and I can't find any reports of this happening to other users.

Link to comment
Share on other sites

The commas are not being converted for the same reason Leftwords didn't get converted - FMP thinks this is string literal.

 

Corrupt script is possible and they've happened to myself, although not exactly as this case.

 

Make a new script.

Link to comment
Share on other sites

  • 3 months later...

This topic is 3863 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.