Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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.

Posted

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!

Posted

Ugo:

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

Posted

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.

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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.

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