June 1, 201312 yr 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?
June 1, 201312 yr 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.
June 1, 201312 yr 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.
June 1, 201312 yr 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.
June 1, 201312 yr 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.
June 2, 201312 yr 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.
June 2, 201312 yr 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.
September 29, 201312 yr 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.
Create an account or sign in to comment