Municipal Addresses - Narrow user input list base on previous list.
Hi,
I've created a fairly simple workflow that allows a user to seach street names using an Autocomplete Box. I would like to expand the functionality by allowing the user to search the address numbers available based on street selected.
Any help would be appreciated.
Thanks,
Gary
0
-
The simplest way to that would be to add a Combo Box and use the Cascading ID option to load the result of the Autocomplete Box. That way the addresses in the combo box will be specific to that street.
If you want an additional Autocomplete box, then you'll have to have a next button and use the results of the first Autcomplete box in a new Display Form (because Autocomplete boxes can't currently cascade).0 -
"If you want an additional Autocomplete box, then you'll have to have a next button and use the results of the first Autcomplete box in a new Display Form (because Autocomplete boxes can't currently cascade)."
Hey John, I'd be interested in seeing an example of that, if you had one????0 -
Here's a super basic sample:
https://drive.google.com/open?id=1-XKLgYy73NkajiiOk8szzG4YQM6LzDn9
I put notes in each Display Form, but in case those aren't clear, here's what happening.
Each Display Form is searching one of our public map services (parcel boundaries). The first form uses and Autocomplete box to let you select one of the ZIP codes in our city. The second form also uses an Autocomplete box to do an address search, but it will only return addresses within the ZIP code you selected in the first form.
It's doing that by using a runtime modification to create a where clause that includes the ZIP code from the first form as part of the query:
"ZIP = '" & resultZIP & "' AND Address LIKE '%{0}%'"
Like I said, super basic and pretty silly for a sample, but the workflow logic would be the same for any other scenario involving searching one field first and then searching a second field for values based on the first search. You could also have the second form search a completely different map layer, provided it has a common field or a field that contains the search result value as part of it.0 -
That's awesome, John, Thanks!
Sooooooo..... could I make the appearance of the second box (whether it shows up or not) dependent upon the results from the first box??? Like if the first box was street addresses, and if there is more than one/duplicate street addresses, THEN the second box comes up with cities or ZIP codes to further define the addresses from box 1? Does that make sense? This is my first dabbling in runtime mods....0 -
Hmm, I don't know if you could do that purely with runtime modifications, but you could do that with a Flow Decision in a flowchart. Here's how it'd basically work.
1) Do your first Display Form as you described it
2) Run a Query Task with the address result to create a feature set and get a count of how many address in your dataset match
3) For the Flow Decision, use the Condition YourFeatureSet.Features.Count() > 1
4) If it's true, send the user to a second Display Form to pick the city/ZIP
5) If it's false, keep going in the workflow with the single result
If you think there's a chance the user would input an invalid address, you could use a Flow Switch (Int32) instead and use YourFeatureSet.Feature.Count() as the expression. Then you could use switch options of 0, 1, and >1 to determine what to do next.0 -
Awesome, John, thanks! I'll let you know what happens when I get there! 0 -
Hi John,
Thanks again for sharing you code.
I really helps to see "real world" workflows.
Regards,
Gary0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare