This project has moved. For the latest updates, please go here.

Searching for a work box owned by a team

The following code example creates a simple query using the WBQuery class in order to search for WBs within a WBC that belong to the given team. Under the hood the WBF converts this code into a CAML query that is executed against the SPList holding the WB metadata for the WBC.

WBTaxonomy teams = WBTaxonomy.GetTeams(SPContext.Current.Site);
WBTeam financeTeam = teams.GetSelectedTeam(“Islington Council/Finance”);

using (WBCollection collection = new WBCollection("http://collection/foi"))
{
    WBQuery query = new WBQuery();
    query.AddEqualsFilter(WBColumn.OwningTeam, financeTeam);

    foreach (WorkBox workBox in collection.GetWorkBoxes(query))
    {
        // ... do something with the work box object

        workBox.Dispose();
    }
}


This query is also used here: Using WBQuery to create a DataTable to bind to an SPGridView


Last edited May 8, 2014 at 1:17 AM by OliSharpe, version 6

Comments

No comments yet.