Select to view content in your preferred language

Using URL Parameters to Zoom to a Feature by Attribute

637
8
Jump to solution
03-31-2025 07:01 AM
Labels (1)
WorcesterGTSS
Frequent Contributor

I want to have url parameters that will zoom to a particular parcel based on the property ID attribute in a field in my organization's parcels layer using my Experience Builder app. I have set up the Search widget per an earlier Esri Community post on this subject. However, I can't seem to get this to work. For example, I'll generate the URL after searching for a particular property - then I'll change the property ID value in the URL to a different one and the map will remain at the original location rather than zooming to the new property. This seems to be related to a string that appears after the data source ID - this changes each time I search for a different property ID (see red bolded text in the generated urls below. The green bold is the parcel property ID.

Can anyone explain what this string is and why it changes or have some advice on how I get a working url parameter that will accomplish what I'm looking for?

Thank you,

Samara

https://experience.arcgis.com/experience/a2380710835a4b8bb9fd9021adea8bd9?org=worcesterma#data_s=id%...3A26983&widget_3=search_status:%7B%22searchText%22%3A%2208-005-00018%22%7D&zoom_to_selection=true

https://experience.arcgis.com/experience/a2380710835a4b8bb9fd9021adea8bd9?org=worcesterma#data_s=id%...3A25358&widget_3=search_status:%7B%22searchText%22%3A%2203-008-00005%22%7D&zoom_to_selection=true

 

 

0 Kudos
1 Solution

Accepted Solutions
WorcesterGTSS
Frequent Contributor

For anyone coming across this, this ended up being my solution:

1. Do not include the Search widget in a widget controller.

2. Use this url parameter:

https://experience.arcgis.com/experience/<appID>#widget_3=search_status:%7B%22searchText%22%3A%22<parcelID>%22%7D  

(with the widget # being whatever your Search widget # is - you can look this up in ArcGIS Assistant)

View solution in original post

0 Kudos
8 Replies
Yuriko
by
Frequent Contributor

I think you may have to have an active selection in combination with the 'zoom_to_selection' parameter as per the documentation here

WorcesterGTSS
Frequent Contributor

For anyone coming across this, this ended up being my solution:

1. Do not include the Search widget in a widget controller.

2. Use this url parameter:

https://experience.arcgis.com/experience/<appID>#widget_3=search_status:%7B%22searchText%22%3A%22<parcelID>%22%7D  

(with the widget # being whatever your Search widget # is - you can look this up in ArcGIS Assistant)

0 Kudos
PaulCyr1
Occasional Contributor

I do not see how to identify the search widget_# in the ArcGIS Assistant nor do I see a widget_# in experience builder. Does ESRI have a widget that helps expose the actual URL Parameters because this guessing of widget numbers is not well done. It just should not be this difficult, it was certainly easier in web app builder.

0 Kudos
WorcesterGTSS
Frequent Contributor

I'm not going to argue that it should be easier to find the widget #s!

I found it by going into ArcGIS Assistant, clicking on the Experience Builder app in question, then clicking on View Item JSON from the Item Details pane that appears, and then clicking on the Data tab.

WorcesterGTSS_0-1745605424221.png

 

 

0 Kudos
Tiff
by
Frequent Contributor

So let's say the original parcel ID was something like 12345

This would be the original URL correct? https://experience.arcgis.com/experience/<appID>#widget_3=search_status:%7B%22searchText%22%3A%22"12345"%22%7D  

And then by adding <parcelID> you can put that into Power Automate or something else to set the URL parameter? I'm having trouble setting this up on my end. Thank you!!

 

0 Kudos
WorcesterGTSS
Frequent Contributor

Right but you wouldn't need the quotes around the parcel ID and you'd need to add the app ID associated with your Experience Builder app. Below is an example from our app where the search is related to this parcel ID: 06-17D-00083

https://experience.arcgis.com/experience/a2380710835a4b8bb9fd9021adea8bd9#widget_3=search_status:%7B%22searchText%22%3A%2206-17D-00083%22%7D 

0 Kudos
Tiff
by
Frequent Contributor

Ahh I see. For my sample url by manually searching it did put my ID (object ID) within quotes but I thikn I can see that it works without it. 

Have you used the URL parameter somewhere like in Power Automate? It's always tricky for me to work with the encoding and hyperlinking exactly how it should and so it's often a lot of trial and error for me. If you've tried it, did you use the @{decodeUriComponent( function? and any other tips?

0 Kudos
WorcesterGTSS
Frequent Contributor

No, sorry. Our web developer integrated it into our website that uses Drupal.

0 Kudos