AnsweredAssumed Answered

Strange FileMaker PHP API Issue

Question asked by fmdataweb on Oct 15, 2015
Latest reply on Oct 17, 2015 by fmdataweb

I'm working with a simple database that displays the size of the file inside a container field - it's a calculation field with a text result/unstored. Everything appears fine in FileMaker Pro (v13) but when I view the record via the FileMaker PHP API I'm getting a different result to what appears in FileMaker, which I've never seen before. This is only happening for some records however.


For example if I have a record that has a value of ".04 MB" in FileMaker this will appear on the website as "0 MB". All other fields are displaying their correct values.


If I echo out the record to the browser I can see it in the array as:


[zTest] => Array ( [0] => 0 MB )

so the PHP API is displaying the value that it has retrieved from the database. I can't work out what's going on here - but I think it might have something to do with values that are less than 1. If I look at another record that has a larger document stored in the container field it displays both "11.58 MB" in FileMaker and on the website.

I think I can workaround this by doing the calculations in PHP to work out the size in MB but I would like to at least understand what is going on here and what the underlying issue is.