方法
ArcGIS Online と Portal for ArcGIS Map Viewer では、同じフィールド値が複数のフィールドに存在する場合に、条件付きの Arcade 式を使用して、連結するラベルを表示できます。 この記事では、フィーチャ レイヤーに Married と Employed という名前の 2 つのフィールドが含まれています。 Arcade 式を使用すると、フィーチャの両方のフィールドに Yes フィールド値が含まれている場合に、フィールド名を連結してラベルが作成されます。
以下の図は、2 つのフィールドとフィールド値を含むテーブルを示しています。

をクリックします。 ラベルを有効にするには、ラベルの有効化オプションをオンに切り替えます。
アイコンをクリックします。
var output = '';
if ($feature['<field_name1>'] == '<field_value>'){
output = '<output1> ';
}
if ($feature['<field_name2>'] == '<field_value>'){
output += '<output2>'
}
else{
output = '<output3>'
}
return Trim(output);
Note:
If numeric or date field values are used, remove the single quotes (' ') on <field_value>.
Note: If a different concatenating label is desired, users can configure the output statements to something other than the names of fields.

以下の図は、Web マップ上の連結ラベルを示しています。

記事 ID: 000029386
ArcGIS エキスパートのサポートを受ける
今すぐチャットを開始