Share via


FindByIDSpecification.Filter Property

FindByIDSpecification.Filter Property

The filter (FindFilter object) to apply to the results; that is, the specific entity type, properties, and values that the returned results must match. Required.


Public Filter As FindFilter


[C#]

public FindFilter Filter;

Remarks

  • The Filter property is used with the specification parameter of the FindServiceSoap.FindByID method.

  • The Filter property is required; otherwise, a SOAP fault is returned.

Example

[Visual Basic]

    Dim findServiceSoap As FindServiceSoap = New FindServiceSoap
    findServiceSoap.Credentials = _
        New NetworkCredential(myMapPointUserId, mySecurePassword)

    Dim findByIDSpecification As FindByIDSpecification = New FindByIDSpecification
    findByIDSpecification.DataSourceName = "MapPoint.FourthCoffeeSample"
    findByIDSpecification.Filter = New FindFilter
    findByIDSpecification.Filter.EntityTypeName = "FourthCoffeeShops"
    Dim nums1 As Integer() = New Integer() {-21835, -21836}
    findByIDSpecification.EntityIDs = nums1
    
    findByIDSpecification.Options = New FindOptions()
    findByIDSpecification.Options.Range = New FindRange()
    findByIDSpecification.Options.Range.StartIndex = 0
    findByIDSpecification.Options.Range.Count = 30
    
    Dim findResults As FindResults = findServiceSoap.FindByID(findByIDSpecification)



[C#]

   FindServiceSoap findService = new FindServiceSoap();
   findService.Credentials = 
    new System.Net.NetworkCredential(myMapPointUserId, mySecurePassword);

 
   FindByIDSpecification findbyidspec = new FindByIDSpecification();

   findbyidspec.DataSourceName = "MapPoint.FourthCoffeeSample";
   findbyidspec.Filter = new FindFilter();
   findbyidspec.Filter.EntityTypeName = "FourthCoffeeShops";
   int[] arrayID = {-21835, -21836};
   findbyidspec.EntityIDs = arrayID;


   findbyidspec.Options = new FindOptions();
   findbyidspec.Options.Range = new FindRange();
   findbyidspec.Options.Range.StartIndex = 0;
   findbyidspec.Options.Range.Count = 30;

   FindResults foundResults;
   foundResults = findService.FindByID(findbyidspec);


See Also

  FindByIDSpecification Class   |   FindByID Method   |   FindFilter Class