الدرس 5 · الوحدة 5: Making Dashboards Interactive
URL parameters: opening a dashboard already filtered
الفيديو قريبًا
Learn it with your tutor on the live board
أهم نقاط الفيديو
One link, the right view
- Storm night: 6 district crew leads, 1 shared dashboard
- Each lead needs only their own outages
- Clicking selectors takes time and causes mistakes
- A link that opens already filtered fixes this
What you will learn
- Read the parts of a dashboard URL with parameters
- Configure a URL parameter and its target elements
- Build filtered links for many teams, safely encoded
Anatomy of a filtered link
- Everything after the hash symbol holds the parameters
- Each parameter is name equals value
- An ampersand separates parameters
https://city.maps.arcgis.com/apps/dashboards/abc123#district=North&status=Open Setting up a parameter
- Dashboard settings, then URL parameters, then Add
- Pick a type, for example Category
- Give it a short name, for example district
- Add actions: filter the map, list and indicator on field District
Five parameter types
- Category: text values, like North or Open
- Numeric: a number or a range, like pipe size
- Date: a day or a time window
- Geometry: an area to zoom or filter to
- Feature ID: one feature to zoom to and flash
Worked example: water main breaks
- Parameter district: Category, field District
- Parameter status: Category, field Status
- Link:
#district=North&status=Open - Several values:
#status=Open,Crew%20Assigned
What happens when the link opens
- Browser loads the dashboard
- Dashboard reads the parameters after the hash
- Filter actions query the layer
- Every targeted element shows the filtered data
layout: side
direction: TB
components:
mail: {kind: email, label: Email link}
br: {kind: browser, label: Browser}
dash: {kind: dashboard, label: Dashboard}
fl: {kind: database, label: Outage layer}
links: [mail->br, br->dash, dash->fl]
steps:
- at: "follow one click"
show: all
- at: "taps the link"
flow: ["mail>br: open URL", "br>dash: district=North", "dash>fl: filter query", "fl>dash: North rows"]
- at: "only sets the starting"
highlight: [dash]
note: Selectors still work Building links for every team
from urllib.parse import quote
base = ("https://city.maps.arcgis.com"
"/apps/dashboards/abc123")
districts = ["North", "South Bay", "Old Town"]
for d in districts:
url = f"{base}#district={quote(d)}&status=Open"
print(url) Time windows and single incidents
- Storm window:
#storm=2026-09-20,2026-09-27 - One incident:
#incident=4521 - Mix them:
#district=North&storm=... - Test each link in a private browser window
Common mistake: trusting the link
- Question mark instead of hash: ignored
- Name or value spelled differently: no match
- Unencoded spaces: value cut or broken
- A parameter is not security: anyone can edit it
Recap
- The hash starts parameters; ampersands join them
- Set up each parameter and its actions in settings first
- Encode values and remember links are not security
Your exercise
- Open one of your dashboards in edit mode
- Add a Category parameter on a district or status field
- Build 3 links, one with two values
- Open each in a private window and check the counts
النص المكتوب
One link, the right view. Picture a storm response night at a utility. You've built one outage dashboard for the whole service area, and six crew leads are about to open it on their phones in the rain. If every lead has to find the district selector, scroll, tap, and remember to clear yesterday's filter, someone will end up working from the wrong list. What you really want is to send each lead a link that opens the dashboard already showing their district, with open outages only. ArcGIS Dashboards does this with URL parameters, and it takes about ten minutes to set up. In this lesson we'll build exactly that.
What you will learn. By the end of this lesson you'll be able to do three things. First, read a dashboard link and point to the part that carries the filter, so you can fix a broken link just by looking at it. Second, set up a URL parameter in the dashboard settings and choose which elements it filters. Third, build a whole set of links for many teams at once, with the values written so that browsers never mangle them. We'll use water main breaks, outages and traffic incidents as examples, the same kinds of layers you've used earlier in this course.
Anatomy of a filtered link. Here's a complete link. The first part is the normal address of the dashboard, ending in its item ID, the long code that identifies it in your organization. Then comes the key character: the hash symbol. Everything after the hash is read by the dashboard as parameters, which are simply named settings passed in through the link. Each one is written as a name, an equals sign, and a value. So district equals North is one parameter. To add a second, you join them with an ampersand, the and symbol, giving status equals Open. The browser doesn't send this part to a server; the dashboard reads it after it loads.
Setting up a parameter. A link can only filter what the dashboard knows about, so you set the parameter up first. Open the dashboard in edit mode, go to the settings, and find URL parameters. Add one and choose its type. For a district name, the type is Category, because it matches text values in a field. Give it a short name with no spaces, like district. Then add actions, just like you did with selectors: filter the outages layer behind the map, the list and the indicator, on the District field. Save, and the dashboard now listens for district in any link that opens it.
Five parameter types. Category isn't the only type. Numeric parameters take a single number, or a minimum and a maximum separated by a comma, for example water mains between twelve and twenty four inches. Date parameters take a day or a start and end date, which is perfect for a storm window. Geometry parameters take an area, written as corner coordinates, so a link can open the map on one neighborhood and filter to it. Feature ID parameters point at a single feature, so a link in an email can open the dashboard zoomed to incident forty five twenty one, with it flashing on the map. Pick the type that matches the field you want to filter.
Worked example: water main breaks. Let's build a real one. Your water main break dashboard has two category parameters, district and status, each filtering the map, the list and the indicator. The North supervisor gets a link ending in district equals North, ampersand, status equals Open. When it loads, they see only open breaks in North. What if they also want breaks where a crew is already assigned? Category parameters accept several values separated by commas, so status equals Open, comma, Crew Assigned. Notice the space in Crew Assigned is written as percent twenty. That's how links spell a space safely, and it matters, as we'll see.
What happens when the link opens. Let's follow one click from start to finish. The crew lead opens the email and taps the link. The browser loads the dashboard, and the dashboard reads everything after the hash. It finds district equals North, runs the filter action you configured, and asks the outage layer only for rows in North. The map, the list and the indicator all draw from that filtered result, so the lead lands on their own district. They can still change the selectors afterwards. The parameter only sets the starting view, it doesn't lock anything in place.
Building links for every team. Here's a shortcut for when you have many teams. Instead of typing links by hand, a few lines of Python build them all. We store the base address once, list the districts, and loop over them. The quote function, from Python's standard library, encodes each value for a URL, which means it rewrites risky characters like spaces into safe codes. Run it and you get three links. Look at South Bay and Old Town: the spaces come out as percent twenty, exactly like our earlier example. One caution for links with several values: encode each value on its own, then join them with a plain comma, because quote turns a comma into percent two C and the dashboard may read the pair as one value. Paste the list into your storm call sheet or a group chat, and every lead has their own link.
Time windows and single incidents. Date and feature ID parameters make links even more useful. For an after-action review, a date parameter named storm can take a start and end date separated by a comma, so the link opens on just that week of traffic incidents or outages. For a single event, a feature ID parameter lets a dispatcher send a link that opens straight on incident forty five twenty one. You can combine types with ampersands, like district plus storm window. Before you send any link, open it in a private browser window, and sign in if the dashboard is shared only with your organization. That shows you what someone arriving fresh will see.
Common mistake: trusting the link. The most common failures are small typing slips. A question mark instead of the hash, and the dashboard ignores the parameter. A name that doesn't match the one in settings, or a value spelled differently from the field, like North East when the field says Northeast, and nothing matches, so the list comes up empty. To be safe, copy values exactly as they appear in the field, capitals included. A raw space, and the value can break. The bigger trap is thinking a filtered link protects data. It doesn't. Anyone can delete the parameter and see every district. If some teams must not see other data, control that with sharing groups and hosted feature layer views, not with links.
Recap. Let's wrap up. A dashboard link carries its filters after the hash symbol, as name equals value pairs joined by ampersands. Before any link works, you add the parameter in the dashboard settings, pick its type, and choose which elements it filters, just like a selector. And when you build links, encode the values, test them in a private window, and remember that a parameter only sets the starting view. With that, one dashboard can serve a whole storm response team, each person opening straight to the view they need.
Your exercise. Now it's your turn. Pick a dashboard you've built in this course, a service request or traffic incident one works well. In edit mode, add a Category URL parameter on a district, status or type field, and target the map, a list and an indicator. Then build three links: two with a single value each, and one with two values separated by a comma. Open each in a private browser window and check that the indicator count matches what you expect. Next lesson we'll look at refresh intervals and live feeds for real-time monitoring.
استكشف الرسم المتحرك
الرسوم المتحركة نفسها التي في الفيديو، دقيقة وتفاعلية: شغّلها أو أوقفها، أو اسحب المؤشر، أو انتقل إلى أي خطوة بالسرعة التي تناسبك.
Loading the animation...
ملخص الدرس
- مشاهدة الفيديو
- The hash starts parameters; ampersands join them
- Set up each parameter and its actions in settings first
- Encode values and remember links are not security