Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have tables DEPatientVisit and DEPhysician

i need to filter the data based on StimulatorGourpId of DEPatientVisit. what i tried for this one

localhost:33396/FalconCPDataService.svc/DEPhysicians?$format=json&$expand=DEPatientVisits&$filter=DEPatientVisits/StimulatorGourpId+eq+guid%27F321EDAB-14C6-4FF2-9485-00ABD176EBC4%27
Exception :

it gives following exception "{"odata.error":{"code":"","message":{"lang":"en-US","value":"The parent value for a property access of a property 'StimulatorGourpId' is not a single value. Property access can only be applied to a single value."}}}"

the reponse of DEPatientVisit there is no nested values

{"odata.metadata":"localhost:33396/FalconCPDataService.svc/$metadata#DEPatientVisits","value":[{"VisitID":"f321edab-14c6-4ff2-9485-00abd176ebc4","PatientID":"c588df3b-9ea4-439b-9ab6-968a793dad2b","StimulatorGroupID":"b08d89e2-7dba-48ce-9430-282501397550","PhysicianID":null,"UserName":null,"PainMapID":null,"VisitDate":"2014-02-19T10:18:42","VisitReason":"usLro4OooDlMNJuWZHqeSXEKFwphz3Y9dvUr37RxHFz0h86aCImdsxUjuMWX64RG","Diagnosis":"7if/VTG/jeRgg0RjGp9Uzbi5iSglBgw59CwJKXcnk5E=","ClinicName":null,"ECModel":null,"ECSerial":null,"ECType":null,"ECFirmwarePN":null,"Notes":"","StimulationOnVAS":0.0,"StimulationOffVAS":0.0,"CRC":47851}
i tried like this

localhost:33396/FalconCPDataService.svc/DEPhysicians?$format=json&$expand=DEPatientVisits&$select=FullName,DEPatientVisits/Diagnosis,DEPatientVisits/VisitDate&$filter=DEPatientVisits/any(v:v/VisitID+eq+guid%27F321EDAB-14C6-4FF2-9485-00ABD176EBC4%27)
but the response of json is null {"odata.metadata":"/FalconCPDataService.svc/$metadata#DEPhysicians&$select=FullName,DEPatientVisits/Diagnosis,DEPatientVisits/VisitDate","value":[]}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900