on 11-17-2014 7:29 AM
Hi,
I have a question regarding filter parameters.Can't we filter based on non-key parameters ?
say i have Cid as a key parameter and Name as property in my entity, cant i filter entries based on 'Name' property ?
DetailsSet?$filter=Cid eq 'C#######'
is working
DetailsSet?$filter=Name eq 'manvitha'
doesnt seem to work.
Could you please help.
Thanks,
Regards,
Manvitha
Hello Manvitha,
Yes u can filter based on ur non-key parameters as well.
However when u implement Get_Entity_Set / Query irrespective of an input is key parameter or not a key parameter, u can send those as part of ur filter key word.
All those filter parameters in ur DPC_EXT/ DPC class need to be extracted,
Also ur backend logic should be capable of filtering data based on all those input parameters which u send as part of filter keyword.
So check if u r able to get Name parameters in Get_Entity_Set method by putting a break-point.
If u r getting then check are u passing the value 'manvitha' to ur back-end logic as input.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hay Manvitha,
We can apply Odata operation on all the properties of the entity . Say, you have an Entity Employee with Properties as below
EMPId (Key),
EName,
Age,
Date of Birth .
Here you can apply filter on all the above properties . Make sure you have implemented the filter logic in the implementation method.
Sree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.