Select to view content in your preferred language

Filter Widget - URL Parameters

666
4
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!

2 Solutions

Accepted Solutions
Ke_Xu
by Esri Regular Contributor
Esri Regular 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
TonghuiMing
Esri Regular Contributor

Hi @aricraimundo 

The Filter widget now supports URL parameters the same way as the Search or Map widget inside the app URL settings in the recent AGOL Oct release. Let us know if you encounter any issues. Thanks for your feedback!

View solution in original post

4 Replies
Ke_Xu
by Esri Regular Contributor
Esri Regular 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

Ke_Xu
by Esri Regular Contributor
Esri Regular 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
TonghuiMing
Esri Regular Contributor

Hi @aricraimundo 

The Filter widget now supports URL parameters the same way as the Search or Map widget inside the app URL settings in the recent AGOL Oct release. Let us know if you encounter any issues. Thanks for your feedback!