List Shifter Karma Ware - Cannot Read Property 'GetTime' of null

I am using Karma to sort my lists. The plugin has no issue sorting all my columns except one of my date columns. The date data type was created in the same way as the other date data types in the table.

I’ve tried creating a new data type for the date, same issue. I’ve tried rebuilding the workflow, same issue. The issue surfaces once I have date data in the table.

When I change the sorting from the issue date, to another date in the table, the issue goes away.

Any ideas?

That’s probably due to an invalid or empty (null) date being in the list of dates on which you’re trying to sort. (Alternatively: Are you sure your list of “dates” are actually date objects?)

In the former case, I could probably improve the error handling here in a future update.

Hey Keith,

Thanks for responding to my post. Yes, I am sure the dates are date objects:

When I have blank data in the table other objects, those columns sort ok. It just seems the issue is on my dates columns.

If all the line items have dates filled in, the columns sort ok. Once I have a line item with no date, the issue surfaces.

I added a line item manually to the database and I still get the issue - that tells me its not the way I create and save line items on the front end. Also, I did not fill in any data into the date field which means it should be blank.

Any ideas on how to resolve this? Or any ideas on how to reconfigure my List Shifter workflow to give me the same effect as sorting by date:


Right. That’s what I told you. Your list of dates to sort on cannot have nulls in it.

“Don’t do that,” as I’m fond of saying.

As for why: the sort function in LS is designed for high performance. Error checking is minimal.

Obviously you can work around this problem by ensuring your date values are non-null. Do your own error checking. Limit your list to valid/non-null dates before attempting the date-wise sort.

And as I said previously, I may improve error handling for this case, since your case is evidence that it affects someone. But this not a high-priority enhancement.

Ok cool. Thanks for the insight. My users may or may not fill in the date data so I’ll just use sorting when displaying the data.