Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FileMaker entering zeroes as blanks when scripted

Featured Replies

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

Can you provide a simple way to reproduce the problem?

 

  • 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!

  • 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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.