Jump to content

FileMaker entering zeroes as blanks when scripted


Recommended Posts

I have a script that distributes a quantity across various number fields using a "set field" script step. It is possible for the number being distributed to be zero.

When I run the script with debugger, it puts zeroes in the number fields as expected. But if I run the script without debugger, it enters zeroes as null (blank). 

I have absolutely no idea why!

I've tried modifying the script to specify the value with GetAsNumber and I've even tried adding to the Case statement (which determines the portion of the value to be distributed) that if the value to enter is not greater than zero to just enter a zero. Still makes the field blank. 99% of the time but not 100% of the time.

I've checked to make sure all fields are set to be number fields. I've verified this happens for me in both FMP 18 and FMP 19 on two different Windows machines.

For my use case there is a difference between a blank and a zero so it must be correct. Sometimes the field is legitimately empty.

What should I be checking?

Edited by Cable
Link to post
Share on other sites

I don't think so.

I might be onto something. I turned off indexing for the first number field to see if that would help. I was expecting it to put the zero in the first field not not any others. Instead, it put the zeroes in all of the field properly. Huh. However, I also paused the script at one point because I wanted to see something so maybe that had an effect.

Running it again. Unfortunately, it takes almost an hour to run. So, testing is cumbersome!

Link to post
Share on other sites

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
  • Similar Content

    • By ggt667
      Is there a way to throw FMPXMLRESULT as payload at CWP to create new records in FileMaker?
      I tried the following:
      cd /tmp/ curl -X POST -kL "user:pass@127.0.0.1/fmi/xml/FMPXMLRESULT.xml?-db=PushTest&-lay=Table&-findany" | tidy -i -xml -wrap 0 > /tmp/findany.fmpxmresult.xml curl -X POST -kL --data @findany.fmpxmlresult.xml "user:pass@127.0.0.1/fmi/xml/FMPXMLRESULT.xml?-db=PushTest&-lay=Table&-new" A new record is created, however the payload is ignored.
      Payload below FTR
      <?xml version="1.0" encoding="utf-8" standalone="no"?><!DOCTYPE FMPXMLRESULT PUBLIC "-//FMI//DTD FMPXMLRESULT//EN" "http://127.0.0.1/fmi/xml/FMPXMLRESULT.dtd"> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="03/16/20" NAME="FileMaker Web Publishing Engine" VERSION="18.0.4.428"></PRODUCT> <DATABASE DATEFORMAT="MM/dd/yyyy" LAYOUT="Table" NAME="PushTest" RECORDS="17" TIMEFORMAT="HH:mm:ss"></DATABASE> <METADATA> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="name" TYPE="TEXT"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="number" TYPE="NUMBER"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="date" TYPE="DATE"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="timestamp" TYPE="TIMESTAMP"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="time" TYPE="TIME"></FIELD> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="_global" TYPE="TEXT"></FIELD> </METADATA> <RESULTSET FOUND="1"> <ROW MODID="13" RECORDID="24"> <COL> <DATA>Sweet</DATA> </COL> <COL> <DATA>667</DATA> </COL> <COL> <DATA>06/05/2020</DATA> </COL> <COL> <DATA></DATA> </COL> <COL> <DATA>10:44:15</DATA> </COL> <COL> <DATA></DATA> </COL> </ROW> </RESULTSET> </FMPXMLRESULT>  
    • By Nick Lightbody
      My new piece on Medium - with an in depth performance analysis between different types of deployment for FileMaker Server.
      Deployment in a Docker Container on a powerful cloud server comes out as a standout option.
      It will be fascinating to hear your own experience - does it differ from what my testing reveals?
      It will also be fascinating to hear from Wim how the results he gets from his new Punisher performance tool compare with what we get with dsBenchmark?
      Cheers, Nick

      https://nicklightbody.medium.com/claris-filemaker-server-19-a-performance-test-of-linux-v-windows-4bb007b5e2d7
       

    • By Msaeed
      Hi All,
      I would like to find solve my issue, as mentioned on the topic of how can find more than fields like serial No. or Code by IOS camera. please find below the script.
       
       
       
      thank in advance for any help or support  
    • By tomp
      I'm having a problem getting BE_SMTPsend to successfully send an email with an attachment.
      No problem sending without an attachment, but when I add an attachment, I get an error 2 (not sure exactly what that means, but without the attachment, no error)
      These are the argument strings with and without attachments:

      I have tried both relative and direct file paths for the variable $attachment. Examples are:


      Both of them return an error code of 2.
      Since the 'send' without an attachment works, all the values of the fields/variables other than $attachment must be valid.
      Can anyone offer a suggestion as to what might be going on and what I might try to resolve this?
       
    • By Msaeed
      Hi All,
      As per mentioned on topic, in fact i would like to create icon ex. hour in case rigging guard the insert time.

×
×
  • Create New...

Important Information

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