Using triggers and actions to show polygon features based on table match

353
2
09-27-2022 05:29 AM
Labels (1)
elmeriniemi
New Contributor

I am using the experience builder to build a map/dashboard, where the user can click on a city, and then have all the related cities showed on the map.

The related cities have migration data, so by clicking a city you would see all the cities where people migrated to colored according to the amount of people. The data is in two layers:

  1. Polygon layer with all the cities (city_name, id)
  2. Table with city of origin and city where migrated (same as origin if no migration) example of the table below
citymigration_cityamount
city 2city 223
city 2city 456
city 2city 743
city 3city 22
city 3city 914
city 7city 68

 

What I want to do is to use triggers and actions to select and show cities (see figure). If I click on city 2 on the map, it selects all the rows where "city" = 2. Then I want to show on the map all cities, which are on the "migration_city" in the rows where "city" = 2. Is this possible with experience builder without using developer tools? I can show single features by configuring action and trigger but it never shows multiple, unless I select them all manually from the table.

 

Figure - desired action

PNG image.png

0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

You need to use something that allows multiple selections. A list widget would work for that pretty well. Does it need to initiate the selection in the map?

Doing it in the map and getting multiple features selected would require users to know how to use the Select tool in the map to ctrl+click features, or switch to a drag-select box tool. It's not impossible, but I find that the average user who is not already familiar with Esri tools is not aware of this functionality.

- Josh Carlson
Kendall County GIS
0 Kudos
AlexLynch
New Contributor

AlexLynch_0-1664290870197.png

Not sure if this will get to where you need to be, but: you're going to want to select data records in framework. trigger data will be city and action data will be migration city. Additionally, you can use filter action to limit user to only see migration city where migration_id = city_id. be sure to create View for empty selection--typically where ObjectID is blank.

0 Kudos