Jump to content

FileMaker entering zeroes as blanks when scripted


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

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 comment
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 comment
Share on other sites

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