Description
In some instances, the Filter widget in ArcGIS Experience Builder does not display newly added coded domain values from ArcGIS Online when feature layers containing the coded domains are symbolized using unique values.
Newly added coded domain values, van and bicycle, are displayed in the domain list in ArcGIS Online but are not displayed in the Filter widget in ArcGIS Experience Builder as shown in the example below.
Cause
New values added to a domain field symbolized using unique values are automatically grouped under the Other category in the ‘Style options’ pane in Map Viewer. As a result, features containing these values are not displayed on the map, and the Filter widget does not reference or display the new values when filtering the data.
Solution or Workaround
Move the newly added domain values from the Other category to the main category
- In ArcGIS Online, navigate to Content > My content.
- Browse to the web map, click More Options
, and select Open in Map Viewer. - In Map Viewer, on the Contents (dark) toolbar, on the Layers tab, click the feature layer.
- On the Settings (light) toolbar, click Styles.
- In the Styles pane, under Types (unique symbols), click Style options.
- In the Style options pane, under the Other category, check the check boxes next to the new domain values and select Move to group. Refer to ArcGIS Online: Types (Unique symbols) for more information.
- In the Move to group window, select the group to include the new values. In this example, Vehicle is selected.
- Click Done > Done.
- On the Contents (dark) toolbar, click Save and open > Save to save the web map.
- In ArcGIS Experience Builder, refresh the experience.
Configure the expression in SQL Expression Builder
- Open the ArcGIS Experience Builder web experience. Refresh the web experience, if necessary.
- On the canvas, click the Filter widget to open its configuration panel.
- On the configuration panel, on the Content tab, select the existing filter to open the Create new filter panel.
- In the Create new filter panel, under SQL Expressions, click SQL Expression Builder.
- In the SQL Expression Builder window, configure the expression.
- For the field input box, select a field from the drop-down list. In this example, the field Vehicle_Type is selected.
- For the operator input box, select a functional operator from the drop-down list. In this example, the is operator is selected.
- Click Select source type and select Unique.
- Click More input settings > Ask for values.
- In the List values based on drop-down list, select All unique values of this field.
- Click OK.
- Save, preview, and publish the experience.
Add a new field and copy data from the original field before configuring the SQL expression
- In ArcGIS Online, navigate to Content > My content.
- Browse to the hosted feature layer to open the item page and add a new field. In this example, the newly created field is named Vehicle_Type2.
- On the Fields tab, click the newly added field.
- Click Calculate field to configure the calculation expression for the field.
- On the Calculate field tab, select SQL and click Next.
- In the expression box, type the following expression. Replace <FieldName> with the name of the original field. In this example, the field name is Vehicle_Type.
<FieldName>
- Click Run calculation.
- On the Data tab, click Fields and click the new field. Under the Domain section, click Get started to create a domain list. Refer to ArcGIS Online: Create a domain list for more information.
- In the Manage domain window, select Enter values and click Next.
- Click + Add value to add all values from the original field.
- Click Save.
- Open the ArcGIS Experience Builder web experience. Refresh the web experience, if necessary.
- On the canvas, click the Filter widget to open its configuration panel.
- On the configuration panel, on the Content tab, select the existing filter to open the Create new filter panel.
- In the Create new filter panel, under SQL Expressions, click SQL Expression Builder.
- In the SQL Expression Builder window, click Add clause and configure the expression.
- For the Field input box, select the newly added field from the drop-down list. In this example, Vehicle_Type2 is selected.
- For the Operator input box, select a functional operator from the drop-down list. In this example the is operator is selected.
- Click Select source type and select Unique (predefined).
- Click the Predefine unique values input box.
- In the Predefine unique values window, click +Add and add the desired values from the field.
- Click OK.
- Click OK to close the SQL Expression Builder window.
- Save, preview, and publish the experience.
The Filter widget below displays the newly added coded domain values when filtering the data in ArcGIS Experience Builder.