Select to view content in your preferred language

Filter Widget - URL Parameters

251
3
Jump to solution
03-25-2025 06:18 PM
aricraimundo
Occasional Contributor

Hi,

I have an Experience Builder app that consumes a map with a feature layer representing an indoor mapping system, where different features exist on different floors.

I'm using a Filter widget to allow users to filter floors based on a field called "floor" (e.g., floor = 1, floor = 2). The Filter widget is configured for unique selection, meaning users can select only one floor at a time.

I would like to use URL parameters to share a specific feature and I would like to pre-set the Filter widget via the URL.

https://doc.arcgis.com/en/experience-builder/latest/build-apps/url-parameters.htm

I’ve tried using a URL format like this:

 https://experience.arcgis.com/experience/[MyAppId]#[MyWidgetId]=filterItems:{encoded JSON filterItems}

Where:

  • MyAppId is the ID of my Experience Builder app.
  • MyWidgetId is the ID of my filter widget (e.g., widget_66).

However, I haven’t been able to get it to work. How can I achieve this?

I would also like to know if this is even possible.

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
Ke_Xu
by Esri Contributor
Esri Contributor

Hi @aricraimundo,

The data_filter will only filter my data source, while the Filter widget will remain unchanged.


Yes, the state of the Filter widget does not change.


I would like to define the filter expression used in the Filter widget using URL parameters.


Currently this new feature is not supported.

 

Thanks,

Ke

View solution in original post

0 Kudos
3 Replies
Ke_Xu
by Esri Contributor
Esri Contributor

Hi @aricraimundo,

From the doc, the format url is:

http://experience.arcgis.com/experience/<AppID>/?data_filter=<datasourceID>:sqlexpression

 

The following is an example URL with an encoded filter parameters (objectid=3):

https://experiencedev.arcgis.com/experience/098526e7e8df4815877174370ba531b7/?data_filter=dataSource_2-e920fece5eda481aaa64b1854b3aedae%3AOBJECTID%3D3

 

You could click on the feature to getthe datasourceID.

 

Ke_Xu_0-1742971194346.png

 

Thanks,

Ke

 

aricraimundo
Occasional Contributor

Hi @Ke_Xu 

The data_filter will only filter my data source, while the Filter widget will remain unchanged.

I would like to define the filter expression used in the Filter widget using URL parameters.

Thanks,

Ari

0 Kudos
Ke_Xu
by Esri Contributor
Esri Contributor

Hi @aricraimundo,

The data_filter will only filter my data source, while the Filter widget will remain unchanged.


Yes, the state of the Filter widget does not change.


I would like to define the filter expression used in the Filter widget using URL parameters.


Currently this new feature is not supported.

 

Thanks,

Ke

0 Kudos