Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to use the built in sharepoint U.I to setup a filter for Scheduling Start Date & Scheduling End Date.

However I noticed that if you setup something with a "Scheduling Start Date" as "Immediately" it will put nothing in the "Scheduling Start Date" column.

This leads me to think that is is null or empty.

However I need to check for this but I can't figure it out.

If I do

It will fail. I also tried to compare against "null" but it says it can't use this to compare it. So how can I check for this "immediately" case?

If I was writing this in code it probably like

 if(startDate == null || startDate <= [Today])
{
   // do something
} 

So how do I do this in the U.I or how do I right my own filter?

I am having the same problem with "Scheduling End Date" if it is set to "Never"

share|improve this question

2 Answers 2

up vote 1 down vote accepted

The easy answer is to make the fields required and you don't hae to worry about null values ;-).

In 2007, it was DateColumn is less than or equal to [Today] OR (clicking the add additional filters hyperlink) DateColumn is equal to (leave the field empty). It should still hold true in 2010, I haven't heard of changes to the list view filters.

enter image description here

share|improve this answer
    
Can you screenshot this. I don't see this hyperlink. I see "Show More Columns" –  chobo2 May 10 '11 at 15:56
    
Added screenshot, this is in 2007, not 2010. I'm going off the assumption the view capabilities are the same. –  PirateEric May 10 '11 at 16:00
    
Ok I got that link. Cool I think that actually works! –  chobo2 May 10 '11 at 16:03

If you set item scheduling to start Immediately, internally the Scheduling Start Date is set to 01/01/1900. So, you should be able to test for <= [Today] and get items that are set to Immediately.

Similarly, Never equates to 01/01/2050

Here is the reference from MSDN:

ScheduledItem.StartDate

ScheduledItem.EndDate

share|improve this answer
    
I tried that before. It does not get results back that don't have a Start Scheduling Date set. Event if I put less than or equal to [Today]. –  chobo2 May 10 '11 at 15:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.