Hello ArcGIS Field Maps Team,
We recently observed an issue with the Arcade's "DateOnly" (https://developers.arcgis.com/arcade/guide/types/#dateonly ) function in your application.
When adding DateOnly to our Arcade expression the entrire expression does not display in Field Maps but does display in Map Viewer with no issues. Example below.
Arcade Expression:
Map Viewer:
Field Maps:
When removing the DateOnly function, the Arcade expression works with no issues in Field Maps:
Is this a known bug?
Thanks,
Amanda Huber
Solved! Go to Solution.
Doug is correct in that you should not be using 'date' as a variable name. Just because it works in one part of the platform does not mean it will work elsewhere.
DateOnly as a type and DateOnly() as a function are recent. Again Doug is correct that Arcade may not work across the platform. You can view a functionality matrix here:
https://developers.arcgis.com/arcade/guide/version-matrix/
Looking at the two documentation pages:
https://developers.arcgis.com/arcade/function-reference/date_functions/
https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly
They are both supported at Arcade 1.24 as core functionality. This aligns with version 200.3 of the ArcGIS Maps SDKs for Native Apps (what field maps runs on).
However it appears that the current release of Field Maps may be on an earlier version of the SDK. Referring to this post from July that states it's on 100.15:
Clicking through Field Maps app 'about' it directs me to ArcGIS Runtime API for iOS and states current version as 100.15.6.
It seems that Field Maps is behind the platform when it comes to supporting Arcade. We'll likely get a major update in fall 2024 or 2025 that moves it to the 200.x SDK.
This is difficult but Esri is making steps in the right direction to have universal platform support in a common language and better documenting it (though I think they could do better with showing "Field Maps" on the arcade compatibility matrix instead of the SDK... it was a bit hidden here).
See how it is underlining date as a var name on you. I think its reserved and that is the warning.
Good eye, but date as a varible has not been an issue either way (works in field maps and map viewer), it's the 'DateOnly' that's the problem.
I would think it would make SDE Lite made and maybe cause the issue. I would always fix a warning like that.
Tested your theory and changed the "date" text variable to "dte" and still a no go, unfortunately it did not make a difference.
The "DateOnly" function is what's breaking this expression-
with date changed to dte FieldMaps still doesn't display the expression-
Thanks,
Amanda
Hmm have you tried specifying a format?
DateOnly("10 Jan 2022","D MMM Y")
Regardless of formatting, shouldn't Field Maps respect DateOnly as a valid function like MapViewer is?
All kinds of stuff does not work across the platform. Just posted this one too. https://community.esri.com/t5/arcgis-field-maps-questions/relationships-0-fieldname-not-working-in-f...
Doug is correct in that you should not be using 'date' as a variable name. Just because it works in one part of the platform does not mean it will work elsewhere.
DateOnly as a type and DateOnly() as a function are recent. Again Doug is correct that Arcade may not work across the platform. You can view a functionality matrix here:
https://developers.arcgis.com/arcade/guide/version-matrix/
Looking at the two documentation pages:
https://developers.arcgis.com/arcade/function-reference/date_functions/
https://developers.arcgis.com/arcade/function-reference/date_functions/#dateonly
They are both supported at Arcade 1.24 as core functionality. This aligns with version 200.3 of the ArcGIS Maps SDKs for Native Apps (what field maps runs on).
However it appears that the current release of Field Maps may be on an earlier version of the SDK. Referring to this post from July that states it's on 100.15:
Clicking through Field Maps app 'about' it directs me to ArcGIS Runtime API for iOS and states current version as 100.15.6.
It seems that Field Maps is behind the platform when it comes to supporting Arcade. We'll likely get a major update in fall 2024 or 2025 that moves it to the 200.x SDK.
This is difficult but Esri is making steps in the right direction to have universal platform support in a common language and better documenting it (though I think they could do better with showing "Field Maps" on the arcade compatibility matrix instead of the SDK... it was a bit hidden here).
Thanks for your response! This is a very helpful explination and thanks for pointing out how to discover each version. That being said, is there a more straightforward resource to determine what version of Arcade each Esri app is on? We're running into another example of this, but unclear why. This time Field Maps won't even submit the point it just keeps spinning and spinning (when editing in AGOL no issues)-
Also to clarify and make sure I'm understanding this right-
Since you mentioned Field Maps is on SDK version 100.15 does this mean that it's only using Arcade version 1.19?
Thanks so much for helping me understand this, still learning new things about arcade compatibilities!
Best,
Amanda Huber