Select to view content in your preferred language

Dynamic Text From Polygon Selection on Map

629
2
Jump to solution
08-28-2023 12:38 AM
JessicaHancock
New Contributor II

Hello! Could someone please tell me how to apply dynamic content to the text widget so when the user selects a polygon from the map (in my case a state boundary), data about that polygon appears? For example, if I click on the state of Illinois on the map, I want the "State Name" of "Illinois" to show up on the right. And if I decide I don't want Illinois, but Indiana, when I click Indiana on the map, the name on the right shows up as "Indiana."

Thank you so much!

0 Kudos
1 Solution

Accepted Solutions
ThomasCoughlin
Esri Contributor

Hi @JessicaHancock, you can do this with the Text widget's dynamic content feature, which lets you populate a text widget with attributes from selected features.

At the top of the Text widget's settings you have this Connect to data switch. Turn that on, then click Select data and choose the layer(s) you want to use to populate text.

ThomasCoughlin_1-1693236682355.png

Once you have a layer connected then you can go to the widget's toolbar and see that the Dynamic content button is available. Click that to open the Dynamic content panel, where you can add attributes and expressions as text.

ThomasCoughlin_2-1693237025789.png

What you'll want to do, like I've done here, is make sure your data is set to Selected features and add whichever attribute contains the state names. When the user clicks on Illinois the text will update to say "Illinois".

ThomasCoughlin_0-1693236479431.png

There's a section in my tutorial Get started with ArcGIS Experience Builder that goes over this too. Control + F search for "Add dynamic text".

Hope this helps!

View solution in original post

0 Kudos
2 Replies
ThomasCoughlin
Esri Contributor

Hi @JessicaHancock, you can do this with the Text widget's dynamic content feature, which lets you populate a text widget with attributes from selected features.

At the top of the Text widget's settings you have this Connect to data switch. Turn that on, then click Select data and choose the layer(s) you want to use to populate text.

ThomasCoughlin_1-1693236682355.png

Once you have a layer connected then you can go to the widget's toolbar and see that the Dynamic content button is available. Click that to open the Dynamic content panel, where you can add attributes and expressions as text.

ThomasCoughlin_2-1693237025789.png

What you'll want to do, like I've done here, is make sure your data is set to Selected features and add whichever attribute contains the state names. When the user clicks on Illinois the text will update to say "Illinois".

ThomasCoughlin_0-1693236479431.png

There's a section in my tutorial Get started with ArcGIS Experience Builder that goes over this too. Control + F search for "Add dynamic text".

Hope this helps!

0 Kudos
JessicaHancock
New Contributor II

Excellent tutorial, Thomas! Thank you very much! I was able to get it to work using the help you provided! Much appreciated! 🙂

0 Kudos