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.

script to omit records where field value is zero

Featured Replies

Im trying to create a report that shows all unpaid invoices. I was
trying to find all records that have a balance that is not equal to zero
and have tried few different approaches, but i am not getting the
desired result. Any help would be greatly appreciated.

 Enter Find Mode (do not pause)

Set Field - your field - "== 0"

Omit Record

Perform Find

 

hth,

Martie

You need to be careful with number field because empty does not equal 0. If any record is null, it will not be found. Three ways to protect: 1) use two requests looking for < 0 and then > 0, 2) use two requests searching for = and 0 and then omitting or 3) force a result in your total so it is never empty.

If never empty, search for single 0 and then Show Omitted. ==0 isn't needed on number field. :-)

  • Author

It is a locked calculation field, so it will never be empty.  Could you show me how the script would read?  I guess Im just a little stuck at the syntax.  I am a long time access user, queries were my crutch. 

  • Author

Thanks for the link.

 

I added:

 

New Record/Request

Set Field [PO Table::Commission Due; "0"]

Omit Record

 

Worked like a charm.

Very good!  If Commission Due is truly a number field, you do not need to wrap in quotes which wastes an evaluation.

 

Also again I caution that if that calculation can ever NOT produce a number or a 0 then it will not be included in what you omit (your find will fail to produce accurate results).  Does every field referenced in the calculation always have a value?  If they are all empty, your calculation will usually be empty as well unless you've modified the calculation to account for it.  Just something to watch for

  • Author

Yes it is a number field.  The field calculates amount due minus any payments or discounts.  The field is locked and guarded against any data entry, so there can only be a zero or a number (amount due)

 

I will remove the quotes though.   Thanks so much for your help.  

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.