Reputation: 31
how to cast guid into string in odata, i have tried the $filter=(startswith(cast(CustomerID, 'Edm.String'),'1'))
but it throws exception Unknown function 'cast'.
Upvotes: 1
Views: 4745
Reputation: 3681
To perform a cast, the type shouldn't be in quotes. So it should be:
$filter=startswith(cast(CustomerID, Edm.String),'1')
(I also removed the extra brackets)
Upvotes: 2