Select to view content in your preferred language

use the data_filter URL Parameter for data views

90
0
01-13-2025 09:57 AM
AndresCastillo
MVP Alum

 

I have a use-case in which I would like to use a data view in a data_filter url parameter.

In the filter, I want to populate the count of a data view that is created from a layer.

The url parameter would be placed inside of the web map popup, and lead the user directly to the filtered page for that data view text.

AndresCastillo_2-1736790363985.png

 

AndresCastillo_1-1736790247872.png

 

 

 

I am able to successfully filter an operational layer in the application when I refer to the <webmap_id>-<layerid>, in this case:

dataSource_1-18a09b4c123-layer-1

https://domain.portal.com/portal/apps/experiencebuilder/experience/?data_filter=dataSource_1-18a09b4...

 

I am NOT able to filter the data view created from that layer:

AndresCastillo_0-1736789985495.png

I obtained the data view's id from the app's item_data in the form of a json text (using arcgis assistant).

In this case, the view's id is:
dataSource_1-18a09b4c123-layer-1-dataView_1:


https://domain.portal.com/portal/apps/experiencebuilder/experience/?data_filter=dataSource_1-18a09b4...

 

The json shows this configuration for how the text is derived in the app:

                "text": "<p>Arrivals: <exp data-uniqueid=\"30b6aeb7_1db3_adce_2edf_80afb82fe54f\" data-dsid=\"dataSource_1-18a09b4c123-layer-1-dataView_1\" data-expression=\"%7B%22name%22%3A%22%20%22%2C%22parts%22%3A%5B%7B%22type%22%3A%22FUNCTION%22%2C%22exp%22%3A%22COUNT%22%2C%22dataSourceId%22%3A%22dataSource_1-18a09b4c123-layer-1-dataView_1%22%7D%2C%7B%22type%22%3A%22OPERATOR%22%2C%22exp%22%3A%22(%22%7D%2C%7B%22type%22%3A%22OPERATOR%22%2C%22exp%22%3A%22)%22%7D%5D%7D\"><span contenteditable=\"false\"> </span></exp>   </p>",

 

Out of that piece of json, I'd think the 'data-expression' string would be relevant to grab for the url parameter to control the dynamic text.

Here is that string for better visibility:

{
  "name": " ",
  "parts": [
    {
      "type": "FUNCTION",
      "exp": "COUNT",
      "dataSourceId": "dataSource_1-184ce793cfa-layer-9-dataView_1"
    },
    {
      "type": "OPERATOR",
      "exp": "("
    },
    {
      "type": "OPERATOR",
      "exp": ")"
    }
  ]
}

 

 

 

I am using ArcGIS Enterprise 11.2

    "originExbVersion": "1.12.0"

 

At this time, this is the only related post:

https://community.esri.com/t5/experience-builder-custom-widgets/datasource-dataview-issues/m-p/11813...

 

I would appreciate anyone's help:

@TonghuiMing 

@Jianxia 

@Shen_Zhang 

@JeffreyThompson2 

 

 

 

0 Kudos
0 Replies