Filtering for an NA date in a PWA View
This post is for the person named Santhiya that commented on my “Server-side Calculation of Custom field formulas” post. I accidentally deleted it instead of approving it. I have it in my notification email so here is what they asked:
How do we use to check whether the Date fields contains values or not.
IN Project professional they are using
" Actual Finish = NA".
how can we use in PWA site while creating view with Filtering option.
Here is the answer:
As you found you cannot filter for “equals NA”. You also cannot filter for '”contains /”. Both of these give you an error when you try to save your filter.
What you can do is test to see if the value in the date field is greater than 1/1/1984. If it is greater than 1/1/1984 then the field contains a valid date.
So “is greater than 1/1/1984” will return only rows where the date value is NOT “NA”. The hard part is that you cannot use this idea to have a filter only show rows there there is NOT a date. The filtering mechanism does not seem to understand the idea of NA.
So the workaround for this is to do a ‘does not contain’ filter for a character that you know will always be in your dates but NOT the forward slash character (which throws an error.) If your dates for this field will always be in this century and you always use regional settings that show four digit dates then you can use this filter:
“does not contain 2”
This filter will return all rows that do not have a date in them if you use 4 digit years and your dates are always greater than 12/31/1999.
I hope this helps. Sorry I deleted your comment Santhiya. :-)