Odata 'startswith' filter not working

I have…

  • [x] Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

My request is returning all data even though I have a filter on it:
https://cloud.squidex.io/api/content/my-project/object?filter=startswith(geohash, ‘9mudqd’)

Expected behavior

this should only return 1 result according to my data

Minimal reproduction of the problem

I ran this in postman

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [x] Cloud version

Version: [VERSION]

Browser:

  • [x] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

I think it should look like this

$filter=startswith(data/geohash/iv, '9mudqd')

Notice:

  • The dollary character ($filter)
  • The path to the field
  • The quotes

Sorry this did not work… anything else to try?

I need an exception or so to help you further. “Does not work” is not a very accurate description.

It’s just a 500 error. Are we able to lookup the traceid or view a log somewhere with the cloud version?

{
“traceId”: “|8cd7045e-4ce585810d772436.”,
“type”: “https://tools.ietf.org/html/rfc7231#section-6.6.1”,
“statusCode”: 500
}

You are not using my example, I see:

https://cloud.squidex.io/api/content/city-canvas-api/artwork?$filter=startswith('data/geohash/iv)', '9mudn4')

it should be

https://cloud.squidex.io/api/content/city-canvas-api/artwork?$filter=startswith(data/geohash/iv, '9mudn4')
1 Like

that works! thank you!

1 Like