Function in Web UI and function in Web SDK application returning two different results, sorted list response

I implemented some pagination logic and when I test with both the web UI (as well as a webhook created to debug this), I get my returned list sorted correctly. The expected response is that the list will be sorted by a name field, ignoring case. When calling with the Web SDK (app.currentUser.functions.functionNameHere), I can see the correct query being sent over the wire, but the response has the list sorted case sensitive (capitals first then lowercase). Nothing happens on my end during this call that could alter the response (no sorting or filtering on the js side).

The collection itself was re-created to specify the collation caseLevel: false, caseFirst: off , and strength: 1. This had no impact on the search itself, even though the field I’m sorting on is indexed as well using default collation.

As mentioned above, I even created a web hook to test this functionality in the odd event that something gets crossed during an http call. The results return sorted as expected.

At this point, I don’t know what else to try and test to get any additional details. Any help would be gratefully appreciated.

1 Like