I would like to retrieve a list of child media via uQuery, based on a provided Media Type. I have tried a few lambda expressions in my LINQ queries such as
var allItems = downloadsFolder.GetChildMedia().Where(x => (x.GetType().ToString() == "Download")).OrderByDescending(x => x.getProperty("date").Value);
and
var allItems = downloadsFolder.GetChildMedia().Where(x => (x.getProperty("NodeTyleAlias").Value.ToString() == "Download"))
but to no avail. Essentially my issue is that I want to order the results by a custom dataetime property, and if there are standard 'File' media types in the list, the top query errors out with a null ref exception.
uQuery GetChildMedia filtered query
I would like to retrieve a list of child media via uQuery, based on a provided Media Type. I have tried a few lambda expressions in my LINQ queries such as
var allItems = downloadsFolder.GetChildMedia().Where(x => (x.GetType().ToString() == "Download")).OrderByDescending(x => x.getProperty("date").Value);
and
var allItems = downloadsFolder.GetChildMedia().Where(x => (x.getProperty("NodeTyleAlias").Value.ToString() == "Download"))
but to no avail. Essentially my issue is that I want to order the results by a custom dataetime property, and if there are standard 'File' media types in the list, the top query errors out with a null ref exception.
Hi Barry,
Does the following work ?
Cheers,
Hendy
is working on a reply...