x First time here? Check out the FAQ
Join the North American Umbraco Festival in March 2015
  • Avatar10posts30karma

    Retrieve list of nodes from list of property values

    Bob started this topic March 2, 2012 @ 02:14

    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.

     -  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"

  • 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