Skip 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.

Putting "Null" records at the end

Featured Replies

I have a script that performs a find via a date field. The field searches for all records with a date greater than today. How do I include titles without a date in that search. I also want to make sure that the fields with "null" are added to the end of the records list. Do I need to add some type of value to the field?

Paul

Hi:

To include records with no date, you can append this to the end of your search script:

New record/request

Set Field [DateField, "="

Perform Find []

Then, to list with all the empty values at the bottom, you will need to add a sort to your script.

Go to your list and sort by your date field. Get the order you want and go back to your find script and put this step:

Sort [Restore]

Or make a separate script for sorting by this date field and add it as a sub-script.

Ken

P.S. Sorting your date field in descending order will put the emtpy ones at the bottom.

or creating another calc field (check_date) that is 1 or 0 depending if the date is empty or not.

--------------------------------------------------------------Ugo--

Check_Date Calcualtion Unstored,=Case(not IsEmpty('Date_field'),1,0)

----------------------------------------------------------------

then sort descending or asc.

[Check_Date] [date_field]

=========================

1-has a date

1-has a date

1..

1....

1..

0- no date

0- no date

0- no date

all the best!

Zilla!

Good... smirk.gif

One little adjustment.

Check_Date Calcualtion Unstored,=Case(DateFied>Status(CurrentDate),1,0)

Ugo:

wink.gif sometimes I can't read - that the user wanted ">" - but hey I am learning slowly but surely

Another little adjustment:

Check_Date Calcualtion Unstored,= DateField > Status(CurrentDate)

The Case isn't necessary since the conditional itself is boolean. So, if DateField is greater than today's date, it will give a 1; otherwise it will produce a zero.

  • Author

Slight problem has occurred. This works great, but I get a zero value in all the dates that are not "> today". How do I get the older dates with the same "1" value.

thanks for all the help

Paul

pkudrle said:

I get a zero value in all the dates that are not "> today". How do I get the older dates with the same "1" value.

I don't get it.

If the older dates also have a 1, then this tip calulation is useless. You said you wanted to list the dates that are not "> today"...

  • Author

Ok so I may have figured out my own solution, thanks in part to your previous suggestions. This is my solution:

If(IsEmpty(WideRelease), 0, 1)

Does anyone see any problems that could occur?

I will then sort by that field, and then by date to get the "null" values at the bottom.

thanks again,

Paul

relax guys I think that the orig. poster has enough to work with wink.gif

  • Author

Ugo DI LUCA said:

I don't get it.

If the older dates also have a 1, then this tip calulation is useless. You said you wanted to list the dates that are not "> today"...

Sorry for the confusion. I have older dates that I also need to show at times, but I still need the "null" values at the bottom. The "If" statement I have made seems to have solved it for me.

Thanks again,

Paul

OK, I get it...

YES, this calc was designed just for that purpose. It's the sort key field you will use to drop the empties at the end, using either Case or If...

pkudrle said:

Ok so I may have figured out my own solution, thanks in part to your previous suggestions. This is my solution:

If(IsEmpty(WideRelease), 0, 1)

More simply, not IsEmpty(WideRelease). The If() isn't necessary, again, since the IsEmpty calculation is boolean. So not IsEmpty() returns a 1 if the field isn't empty and a zero if it is.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.