x First time here? Check out the FAQ

Learn from 350 other Umbracians at the annual Umbraco Conference - CodeGarden '13.
More than twenty high quality sessions, open spaces, hackathons and social events you'll remember. Not to be missed!
Less than 25 tickets left - get yours now!

  • Avatar9posts29karma

    Retrieve list of nodes from list of property values

    Bob started this topic March 2, 2012 @ 02:14 , this topic was edited at: Friday, March 2, 2012 5:49 PM

    Hey folks. I have been scouring this forum for many days trying to solve a problem.

    I have a list of department_ids and would like to query the Departments node for the children with department_id in the list. Is there a way to do this? Ultimately I'd like to order by department name as well.

    Departments
     -  department_id 1
     -  department_id 2
     -  department_id 3
     -  department_id 4
     -  department_id 5
     -  department_id 6

    I have tried a few approaches but they've failed. The last try was:

            DynamicNodeList retList from in @Model.XPath("/root/Departments/Department")
                                      where departmentIDList.Containsp.department_id )
                                      select p;

    This gives me "Query expressions over source type 'dynamic' or with a join sequence of type 'dynamic' are not allowed"


  • Replies

  • Bob posted this reply March 2, 2012 @ 05:49

    n/m part 5 of the walkthrough had something I could use with the Dictionary example.

    Seems to working just wondering how efficient that is...


Please login or Sign up To post replies