November 18, 20205 yr 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 November 18, 20205 yr by Cable
November 18, 20205 yr Author 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!
November 18, 20205 yr Author Yep, I'll be *******, that fixed it. I'm at a loss to explain but I'll take the win! 😆
Create an account or sign in to comment