Don't suppose you, or any one else, managed to find an answer to this one. I have exactly the same problem (or a variation - I want to include all nodes where a date time field is null)..
Using closingDate.GetType() == typeof(DynamicNull) gives Expression of type 'System.Object' cannot be used for label of type 'System.Type'
Using closingDate==null, or closingDate.ToString()==\"\"" returns no nodes, even when closingDate is null.
Where Clause to detect if something is set? DateTime
Hi Guys,
trying to implement a where clause on a dynamicnodelist to get only the children where a property which is a datetime is set..
i have tried:
Model.NodeById(1191).Descendants("someDataType").Where("lastUpdated.GetType() != typeof(DynamicNull)
or
Model.NodeById(1191).Descendants("someDataType").Where("lastUpdated is DateTime")
Model.NodeById(1191).Descendants("someDataType").Where("lastUpdated != null && lastUpdated.ToString() != \"\"")
any advice?
Hi Tom,
Don't suppose you, or any one else, managed to find an answer to this one. I have exactly the same problem (or a variation - I want to include all nodes where a date time field is null)..
Using closingDate.GetType() == typeof(DynamicNull) gives Expression of type 'System.Object' cannot be used for label of type 'System.Type'
Using closingDate==null, or closingDate.ToString()==\"\"" returns no nodes, even when closingDate is null.
Thanks,
James.
is working on a reply...