One of the things we set out to accomplish with Geocortex Workflow 5 was to dramatically boost efficiency and reduce complexities, ultimately increasing the value of your GIS applications.
In today’s Geocortex Tech Tip, we take a look at how Geocortex Workflow 5 can interact with the Attribute Table widget inside Web AppBuilder for ArcGIS. Using fire hydrant data as an example, you’ll discover how Geocortex Workflow 5 can be used to populate this Attribute Table, simplifying the experience of viewing and comparing your layer data.
“Hi everyone, my name is Patrick Fingler. I work in our technical marketing department, and in this video I’m going to show you how you can populate the Attribute Table within Web AppBuilder using Geocortex Workflow 5.
Let’s take a look!
Okay so in this Tech Tip video, I’m going to going to show you how you can populate the Attribute Table within Web AppBuilder using Geocortex Workflow 5. Here you can see I’ve got a web map displaying within Web AppBuilder that’s got some hydrants, it has some service requests, a couple of tax parcels, and often you’ll want to have a workflow that presents the user with a form that allows them to search for a layer on the map and then send that information to the attribute table within Web AppBuilder.
In this example I’ve already built a workflow to accomplish this. It’s a pretty simple workflow, and essentially what it’s doing is it’s presenting the user with a form that is asking them to search for a fire hydrant. They’ve got two options; they can search for a hydrant by just entering the ID of that particular hydrant, or they can search for hydrants on the map.
So in this example, I might be interested in these three particular hydrants, and if I click ‘Next,’ what we’re doing is we’re first selecting those hydrants (well, we’re actually performing a query on those hydrants), then we’re sending the results of that query to the Attribute Table using the ‘Show Results’ activity within workflow 5 and then we’re actually panning the map to the extent of these features.
If I wanted to, I could also search by a single Facility ID, and this example again panning to that hydrant and displaying the attributes.
So let’s see how this works in the back end within workflow designer. This is the workflow that I’ve developed that’s being run within Web AppBuilder, and I’ve deployed to Web AppBuilder and here you can see we’ve got our initial form here that’s just presenting the user with the two options to either search by ID, or search by selection. Then within here, I’m saying if the user clicked submit within that form, we’re then going to query for those hydrants.
We’ll then switch depending on if the user is selecting them via the geometry, or if they’re selecting them by the ID. In this example what I’ve done is actually dynamically generated the hydrant layer URL and I’ll show you how to do that. Then I’m running a query based on the geometry that we selected. Then I’m saying if we got some results – if there’s more than one hydrant that we’ve selected – we’re then going to show those results within Web AppBuilder’s Attribute Table. This is the ‘Show Results’ activity that you’re going to want to use, and here I’m passing in the features from my query.
Now in order to actually get them to show up and be highlighted within the Attribute Table within Web AppBuilder, you have to pass in a layer ID as well as a layer name.
Now again I’m dynamically getting these values from this hydrant layer and I’ll show you how to do that – it’s really useful if you’re building workflows within Web AppBuilder.
Last but not least, I’m then getting the extent of those features, I’m using this activity, and then I’m setting the map extent to the extent of those features and then I’m expanding it by three. It’s zooming out a little bit, and then we’re just displaying our final form asking if they want to return to the start, generate a report or exit.
Now I mentioned being able to get the hydrant layer so you can dynamically get the URL, the ID, and the layer name. In order to do this you can use the ‘Get Layer’ activity within workflow 5 and it accepts a layer ID.
For Web App Builder, this layer ID is the name of the layer within the web map itself. So here I can see this is the Web map that I’m using. And this is the name of that. So I’ve selected that in here.
Once I do that, you’ll see I’m getting the layer and these are all of the properties for the layer, so I’m able to retrieve the layer ID. I can even get the layer name as well as the layer URL, and if you’re using the secured services you can also retrieve the token as well using this process, so it’s a really useful activity. And that’s essentially how you dynamically pass that those values into the show results activity as we can see here.
That’s essentially how you can populate the Attribute Table!
Now I also was clearing the Attribute Table as well. In this example I’m still using the layer ID and layer name, but I’m just passing in blank features. So if we rerun this workflow, and search by selection so let’s select a couple of these and click “Next,” we can see I’ve selected them. If I click ‘Return to Start,’ I’m then clearing my selection, and if I wanted to generate that final report we can do that by searching for a facility ID and running a report on that. So again that’s how you use these show results activity within Workflow 5 to populate the Attribute Table within Web AppBuilder.
Thanks for watching!”
Curious to try Geocortex Workflow 5? Check out our Discovery Center and see everything it has to offer!