Hello Nandish,
It would be great if you can clearly explain your requirement what is that dynamic thing which you want to achieve ?
Ex:-
Consider Employee entity type having 10 fields, if user selects one option, i have to send only 4 fields in the properties of $metadata
.
If user selects another option, we need to send 8 fields in the properties of $metadata .
We cannot send anything to $metadata. GW frame work will show the details of your GW Model.
In the question you are talking about $metadata, So at the metadata level, Its not in our control to select the properties to be displayed when you fire your $metadata URL. i.e., dynamically.
We cannot dynamically change the properties shown in $metadata at run-time.
If anything related to selecting the properties to be displayed as part of response then Chandra has already show the way to do it.
Regards,
Ashwin