Updated to allow conditions to be applied to array of
ObjectIDs.