05-17-2019 08:10 AM
We’ve just updated to Act! Premium (Web) Version 21.0.295.0, Update 7 (we were on Update 6).
Our application no longer works with the Act Web API as expected.
We are using a regex in a $filter operation which no longer returns any results. Is that not supported anymore? Also, queries are now case sensitive.
Are there other changes we need to be aware of? I can’t see any mention of API changes in your documentation.
Were these changes intentional? I’m unsure whether to roll back to Update 6 or try to work around these changes. I’m worried that there are other changes that we’ve not noticed yet.
05-20-2019 02:05 PM - edited 05-20-2019 02:06 PM
Is the $filter= command just not working or is it just returning no results?
The API did update the Microsoft Odata layer to the latest release (5.7 to 7.1+), but that should not have broke anything. OData is case sensitive by default, you can use the tolower() functions to make it case insensitive.
|string tolower(string p0)||https://services.odata.org/Northwind/Northwind.svc/Customers?$filter=tolower(CompanyName) eq 'alfre...|
|string toupper(string p0)||https://services.odata.org/Northwind/Northwind.svc/Customers?$filter=toupper(CompanyName) eq 'ALFRE...|
05-21-2019 09:34 AM
Thanks for your help.
The $filter command (using a regex) returns no results, obviously it did produce results before the update.
I don't understand how our application has been doing case insensitive queries. I'll try the tolower function.
05-21-2019 10:41 AM
Can you post the regex query that you are using so I can try to replicate the issue. It might be that OData 5.7 didn't code to the OData specification. I didn't have any test that validated 'case' without coding for the tolower() function. So you might be correct that the upgrade affected your queries.
05-23-2019 04:34 AM
The tolower function works as you suggested, thanks. We still need to integrate it in to our application.
The filter query would be something like /api/companies/?$filter=startswith(siteref, '[A-Z]') and contains(name, 'Wollo'), where siteref is a custom field. Maybe this was never really supported, but it was working! We can work around that anyway.
06-07-2019 09:02 AM
Looks like I spoke too soon about the tolower function. It worked fine when I testing it out with Postman.
However, in our application the request is made with $top=100 and we get no results. I also tried it in Postman but got no results.