I’m trying to get some code working using OData. The following bit of code doesn’t seem to work.
ds is OpenDataServiceProxy.
adapterTypeId is the string representation of a Guid.
adapterName is a string name
ds.query('/DataAdapters?$filter=DataAdapterType.DataAdapterTypeId eq guid(\'' + adapterTypeId + '\') and Name eq \'' + adapterName + '\'', ifmgr_CreateAdapter_Step1, onGenericFailure, 'Error');
ds.query('/DataAdapters?($filter=Name eq \'' + adapterName + '\' and $filter=DataAdapterTypeId eq guid\'' + adapterTypeId + '\')', ifmgr_CreateAdapter_Step1, onGenericFailure, '');
The guid value needs to be formated like guid'' - see this for details: http://www.odata.org/developers/protocols/overview#AbstractTypeSystem Don't know what you wanted to achieve with the DataAdapterType.DataAdatperTypeId, but the dot character has no special meaning in the filter expression, so it probably doesn't do what you wanted. If your DataAdapters entity set has entities of type DataAdapterType, which then has a property DataAdapterTypeId which is of type GUID, then you can filter on it by simply
DataAdapterTypeId eq guid'<value>'