laptop and a wrench

不具合

Null values for date fields are not calculated correctly in Map Viewer when using symbology from an Arcade expression.

最後に公開された状態: January 3, 2023 ArcGIS Online
不具合 ID 番号 BUG-000154016
送信されましたNovember 29, 2022
最終更新日August 23, 2024
適用対象ArcGIS Online
見つかったバージョンNovember 2022
オペレーティング システムWindows OS
オペレーティング システムのバージョン10.0 64 Bit
ステータスAs Designed

参考情報

When a null value is passed to the Arcade Date function, it gets implicitly converted to the number 0. Date(0) will return the date based on the number of milliseconds since Jan 1 1970 UTC (in this case 0). To avoid this implicit casting, add null checks in the Arcade expression. Documentation on implicit casting: https://developers.arcgis.com/arcade/guide/type-casting/#implicit-number-casting Date function documentation: https://developers.arcgis.com/arcade/function-reference/date_functions/#dateepoch---date

対処法

Check for null values before creating the date and passing it into the DateDiff function:

var retire = $feature["dateField"]; //.

This is already a date field, and does not need to use the Date() function if (!IsEmpty(retire)) { return IIF(DateDiff(Now(), retire, 'days') >= 0, "retired", "active") } returns null.

再現の手順

不具合 ID: BUG-000154016

ソフトウェア:

  • ArcGIS Online

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動