WhereClause.SearchProperties Property
WhereClause.SearchProperties Property
An array of property/value pairs (EntityPropertyValue[] objects) to match. Valid range is 0 through 10.
Public SearchProperties As EntityPropertyValue()
[C#]
public EntityPropertyValue[] SearchProperties;
Remarks
If the SearchProperties property is set, none of the properties of the EntityPropertyValue objects can be null; otherwise, a SOAP fault is returned.
To identify whether all or any one of the property/value pairs in the array should be matched, use the SearchOperator property.
If the FindFilter.WhereClause property is passed in the Filter object for the FindByIDSpecification, FindByPropertySpecification, FindNearbySpecification, and FindNearRouteSpecification classes, and if the FilterExpression is not assigned, the SearchProperties property is required.
The EntityPropertyValue.Name property must be valid for the data source identified in the corresponding find specification data source name property; otherwise, a SOAP fault is returned.
The values in the array of EntityProperty.Name properties returned in the EntityType.Properties property from the CommonServiceSoap.GetEntityTypes method are valid for use with the EntityPropertValue.Name property for the specified data source.
Example
[Visual Basic]
'Search for stores that are currently operating
Dim mySearchProperties(0) As EntityPropertyValue
mySearchProperties(0) = New EntityPropertyValue()
mySearchProperties(0).Name = "StoreOpen"
mySearchProperties(0).Value = "Y"
Dim findNearbySpec As New FindNearbySpecification()
findNearbySpec.DataSourceName = "MapPoint.FourthCoffeeSample"
findNearbySpec.Distance = 1
findNearbySpec.LatLong = New LatLong()
findNearbySpec.LatLong.Latitude = 47.6
findNearbySpec.LatLong.Longitude = -122.33
findNearbySpec.Filter = New FindFilter()
findNearbySpec.Filter.EntityTypeName = "FourthCoffeeShops"
findNearbySpec.Filter.WhereClause = New WhereClause()
findNearbySpec.Filter.WhereClause.SearchProperties = mySearchProperties
Dim foundResults As FindResults
foundResults = findService.FindNearby(findNearbySpec)
[C#]
//Search for stores that are currently operating
EntityPropertyValue[] mySearchProperties = new EntityPropertyValue[1];
mySearchProperties[0] = new EntityPropertyValue();
mySearchProperties[0].Name = "StoreOpen";
mySearchProperties[0].Value = "Y";
FindNearbySpecification findNearbySpec = new FindNearbySpecification();
findNearbySpec.DataSourceName = "MapPoint.FourthCoffeeSample";
findNearbySpec.Distance = 1;
findNearbySpec.LatLong = new LatLong();
findNearbySpec.LatLong.Latitude = 47.6;
findNearbySpec.LatLong.Longitude = -122.33;
findNearbySpec.Filter = new FindFilter();
findNearbySpec.Filter.EntityTypeName = "FourthCoffeeShops";
findNearbySpec.Filter.WhereClause = new WhereClause();
findNearbySpec.Filter.WhereClause.SearchProperties = mySearchProperties;
FindResults foundResults;
foundResults = findService.FindNearby(findNearbySpec);
See Also
WhereClause Class | FindByIDSpecification Class | FindByPropertySpecification Class | FindNearbySpecification Class | FindNearRouteSpecification Class