Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


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

Recommended Posts

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

  • 3 months later...
Posted

I've just learned that I don't get any email updates of posts that I follow so I'll have to work out why.

 

But in reply to this thread... yes, it was corruption... a new script worked fine.

 

Scary.

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