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

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

Featured Replies

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?

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.

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.

  • Author

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.

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.

  • Author

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.

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

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.

See my response to your other post today.

Create an account or sign in to comment

Important Information

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

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.