var projectSoilPits = filter($featureset, "UPPER(ProjectNumber) = @projectNumber")
var projectSoilPits = filter($featureset, "TRIM(ProjectNumber) = @projectNumber")
var projectSoilPits = filter($featureset, "TRIM(both ' ' from ProjectNumber) = @projectNumber")
Both result in a "Failed to calculate" error when I test the form in both the Map Viewer and the mobile app.
Can someone please tell me why the SQL-92 UPPER function is working for me but TRIM isn't? Thanks in advance!
It is probably that SQL is not fully implemented in all tools. Plus what is implemented varies between, SDE, GDB, in memory sets, AGOL, Map Viewer and ArcPro/ArcMap.
I have asked a few times over the years for documentation on any of this but never got a response. Makes it hard when you are just guessing. Sometimes the syntax is also different. Esp true with in_memory and memory in Python. My guess is that Arcade is also not full SQL
Just some of the posts on this. Sorry not a great answer but it may be better to look for another way like contains maybe?
Many posts on this
https://community.esri.com/t5/python-questions/cast-does-not-work-in-searchcursor-queries/m-p/264322
https://community.esri.com/t5/arcgis-pro-questions/are-def-query-using-sql-now-different/m-p/85499
https://community.esri.com/t5/python-questions/sql-clause-in-arcpy-da-searchcursor-is-not/m-p/51603