Community
Showing results for 
Search instead for 
Do you mean 
Reply

Update 7

New Member
Posts: 10
Country: United_Kingdom

Update 7

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.

Employee
Posts: 107
Country: USA

Re: Update 7

[ Edited ]

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.

 

 

 

https://www.odata.org/documentation/odata-version-2-0/uri-conventions/

 

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...
New Member
Posts: 10
Country: United_Kingdom

Re: Update 7

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.

 

 

Employee
Posts: 107
Country: USA

Re: Update 7

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.

 

New Member
Posts: 10
Country: United_Kingdom

Re: Update 7

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.

New Member
Posts: 10
Country: United_Kingdom

Re: Update 7

Looks like I spoke too soon about the tolower function. It worked fine when I testing it out with Postman.

 /api/companies/?$filter=contains(tolower(name), tolower('woLLo'))

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.

api/companies/?$filter=contains(tolower(name),tolower('woLLo'))&$top=100

Highlighted
Employee
Posts: 107
Country: USA

Re: Update 7

I am working on a fix for this issue right now.  Let you know when the release is scheduled.