Hello,
What is easiest way to get the contains filter working with a web service that uses odata v4?
It seems that web services using odata v4 no longer acknowledge the 'substringof' function and want the ' contains' function. This wouldn't be that big of deal however the parameters are reversed as well making it a bit more trickier than simple substitution.
Examples:
Contains (fails)
http://localhost:1486/odata/BillOfMaterials(2)/BillOfMaterialsItems?%24format=json&%24top=10&%24filter=substringof('xYz'%2CWorkUnitCode)&%24count=true
What it needs to be for the contains function to work
http://localhost:1486/odata/BillOfMaterials(2)/BillOfMaterialsItems?%24format=json&%24top=10&%24filter=contains(WorkUnitCode%2C'xYz')&%24count=true
What is easiest way to get the contains filter working with a web service that uses odata v4?
It seems that web services using odata v4 no longer acknowledge the 'substringof' function and want the ' contains' function. This wouldn't be that big of deal however the parameters are reversed as well making it a bit more trickier than simple substitution.
Examples:
Contains (fails)
http://localhost:1486/odata/BillOfMaterials(2)/BillOfMaterialsItems?%24format=json&%24top=10&%24filter=substringof('xYz'%2CWorkUnitCode)&%24count=true
What it needs to be for the contains function to work
http://localhost:1486/odata/BillOfMaterials(2)/BillOfMaterialsItems?%24format=json&%24top=10&%24filter=contains(WorkUnitCode%2C'xYz')&%24count=true