Designed specifically for Esri’s ArcGIS platform, Geocortex Reporting 5 consolidates maps, spatial data, and relational data from a wide range of sources. When it comes to putting together a custom report for your operation, there is no shortage of tools to help you produce exactly what you need to organize and share your data more efficiently.
In this week’s Geocortex Tech Tip, we explain how to create mailing labels with reports using Geocortex Reporting 5, and the various fields and display options that can be used to give it a unique look and feel.
“Hi everyone, my name is Houtan Emad and I’m with the technical marketing team. Today I’m going to show you how to create mailing labels using Geocortex Reporting 5. Let’s do this!
First, we’ll want to create a site using Geocortex Essentials and the Geocortex Viewer for HTML5. We will add our favorite basemap to the site. And then add our tax parcels layer as a map service. We will then modify the extent of the map to show the area of interest, and save the site.
Finally, we are going to add a viewer to our site, save it, and test it. We can see that by using the Out of the Box tools for the Viewer for HTML5, we are able to select parcels on the map.
Next, we are going to use Geocortex Reporting 5 to create Avery Standard 5160 mailing labels to add to our site. First, we’ll want to make sure that we have our Parcel data source added to the application. Then, we can engage the mailing labels wizard, and select the Avery Standard 5160 format. We’ll then set up the feature id parameters for our report. Add the Tax Parcels data source to it. And finally, connect the input parameters to the data source.
Once our data stream is set up, we can add fields like Owner Name, Site Address, and ZIP code to our report. We will save our report, share it, and copy the URL.
Back in Essentials Manager, we want to add our mailing labels template as a “layer report” to the tax parcels layer. To do that, we will navigate to the parcels layer and edit it. Under the reports tab, we will add our report as defined by its ArcGIS item, give it a name, and a description. We will then save our site and launch it.
After selecting a group of parcels, we are able to use the “Run a Report” function from the selection’s context menu to launch our mailing labels.
That looks alright, let’s see if we can make it look better.
To introduce proper formatting for text overflows, we’ll add a table with 3 rows, and use expressions to stitch together the different fields that need to appear on the same line.
Finally, we’ll remove the borders for a cleaner look.
Let’s save it and test it again.
That’s looking pretty good. Catch you next time!”
Using Web AppBuilder? Discover how Geocortex Reporting can be used alongside it to enhance and extend your applications. Check out our webinar, Enhancing Web AppBuilder for ArcGIS® with Geocortex Reporting by clicking the button below.
The Alberta Energy Regulator (AER) is a regulatory body that’s responsible for overseeing oil, oil sands, natural gas, and coral project lifecycles. Their mandate is to provide safe, orderly and efficient development of energy resources across the province of Alberta.
A few years ago, the AER took on the additional task of regulating reclamation and remediation activities for all of Alberta’s energy resource operations, which was previously managed by the Alberta government ministry, Alberta Environment and Parks (AEP).
Taking on this responsibility came with a backlog of nearly 2,700 upstream oil and gas reclamation certificate applications. The backlog was caused due to a very complex process that required each application to be checked against seven different databases – ultimately leading to a significant amount of manual analysis.
The AER collaborated with the Geocortex Professional Services team to put together a system called OneStop, a program that ensures all criteria for reclamation are properly vetted in a timely fashion by introducing two review levels (one of which is automated) and freeing the AER of resources which could then be allocated towards more high-risk areas.
As soon as OneStop was launched, roughly 80% of the backlog was processed instantly. By utilizing Geocortex Essentials, AER staff were able to extend their ArcGIS functionality with customizable workflows, tools and features, and configurability with other systems, leading to a massive reduction in production time. Additionally, Geocortex Essentials also enabled the AER to integrate with existing enterprise systems quickly and intuitively.
This process has not only allowed the AER to streamline their processes and improve on transparency, but it also led to them receiving an Esri Canada Award of Excellence for leveraging GIS technology to serve a vital part of Alberta’s economy more efficiently.
On Thursday, November 15th, you may have received a communication from Esri describing an important update for ArcGIS and Transport Layer Security (TLS) Protocol Support. The details on Esri’s announcement can be viewed here.
The TLS 1.2 requirement enforces strong security practices using the highest industry standards to ensure that your data and network are as secure as possible. Geocortex software (including Geocortex Essentials, Geocortex Analytics and Geocortex 5-series products) provides support for accessing services and content from servers secured with TLS 1.2; however, there are Windows operating system requirements that need to be in place to ensure continued operation of your production applications.
On servers where Geocortex software is installed, ensure that all Windows security updates have been applied, and/or you have installed Microsoft .NET Framework 4.6 or newer.
End-users working with Geocortex applications using older browsers (Internet Explorer 9 or 10) must manually update their browser settings to ensure compatibility:
Open IE settings in the top right corner,Internet options.
Scroll down to theSecuritysection at the bottom of the list.
Click the option toUseTLS 1.2.
*Tip: You can use this resource to determine if your browser supports TLS 1.2.
If you need help ensuring that your operating system and browser are ready to support TLS 1.2, please contact support at email@example.com.
Geocortex Essentials gives you the ability to tailor your applications to individual users by using fine-grained security to control various elements like layers, features, attributes and other capabilities so users are only seeing the items that you want them to be seeing, and not getting overwhelmed.
In this week’s Geocortex Tech Tip, we take a closer look at the basics of using fine-grained security, and how you can deliver a more personalized experience to your users based on their configured permissions.
“Hi, welcome to Geocortex Tech Tips. My name is Jonathan and today we’re going to be talking about using fine-grained security to control access to layers, features, attributes and application functionality.
Let’s get started!
Here I've got essentials manager open, and I'm going to go to my site and edit its configuration. On the side panel here we can see the permissions tab which is where you go to configure these fine-grained settings. Here you'll see a tree of all of the items included in the site, and each item has a Tri-State check box beside it, which we can turn to deny, allow or inherit, where it will inherit the settings from the item in the tree above it that is set.
Up at the top we'll have a list of the security providers you can configure. For example, ArcGIS online - your organizational account, all users, by group, by organization or organization role. If you pull up one of these, you'll also have to enter the group that you are interested in and there should be a nice dropdown list there. Once you select the group you can go ahead and configure permissions for that particular group.
Let's go back to anonymous here.
First thing - why don't we deny access to the site completely for anonymous users? We'll say you have to be a member of our ArcGIS Online organization to get in. Now there's nothing in this site that secured that would apply the security on its own, but once we have that set in Essentials Manager, now there will be a log in required to view this.
Let's reload our site. We can see the site, but that is because I was automatically signed in, so I'll sign out, and I have to sign in again. There is no way to see this site without being signed in.
Okay so that's pretty basic. Let's look at layers. We can see at the top level under ‘Map,’ we'll have our map service level objects and then under that the layer objects. Now for a feature layer, there's only one layer with the one service level object so it doesn't really matter which you secure. But if you're talking about a dynamic map service you might have more than one layer, so you can choose to secure the whole map service or individual layers, within group layers, etc.
Let’s go back to our heliports layer here, and I'm not going to let the anonymous people see this layer. They can get into the site, but they can't see this layer and you're going to have to be a member of our organization. Don't care who you are, just that you're a member and you're allowed to see it.
Okay, let’s see how that works. So, we'll sign out again now. And now, the site loads up, we can see that that heliports layer is gone, and it is no longer included in the layer list.
Let’s sign in. And it's back!
So, we can also secure the fields on our layer. I might say that all of these fields (there are quite a few fields here) are not necessary for every user to see or maybe you're only going to make them all available to GIS professionals that are in a certain group. So even though we can see this layer as a member of our organization, we're going to turn off some of these fields (in fact we're going to turn off most of them). Notice I don't have to allow the fields that I want to allow, I just have to deny the fields that I want to deny, because these will inherit the allow permission from here. So, let's see that.
First of all, we'll just identify a few of these, just so we can see that all the fields are here right now. And there they are!
Okay so let's reload the site, now we're signed out. There's no layer at all. We'll sign in, the layer is here. But if I identify these features and I take a look only the four fields that I allowed are available. Cool! So what else can you do?
One thing I should point out about fields first before I move on, is that to configure the fields here you do have to first go here, find the layer with the fields on it that you want to configure, and you need to make sure all of the fields have been added here and that they're not just visible because they're configured default visible - they have to be added on this page, and then they will become available on this page to secure.
Let's take a look at some more things that we might deny to anonymous users. We have layer themes, so maybe we don't want them to switch to those layer theme, so we can turn them off. We can also secure print templates and other items that are configured in the site like workflows. Let's see what happens with those layer themes.
Right now if I go in here and I look at my layer list, I am signed in but you can see I have some themes available now. I’ll reload.
Now I do want to be signed out and then if I look, I find that ‘All Available Layers’ is the only theme that I can pick. Were you to turn off the option to show all available layers in the theme settings for this viewer, this drop-box would not be here either. But then when we sign in, we'll find that we again have access to all of the layer themes and we can turn them on like so.
The last thing on the list that I probably should mention is that you can secure individual viewers. You can see I only have one viewer in this site, so I can't turn this one off, or anonymous access will not be allowed at all and it will be like this viewer doesn't exist. Since I don't have any other viewers to load, if I turn that one off for anonymous users then - if they're not already logged in somehow - it's like that viewer no longer exists.
And you can see I couldn't find it. It just loaded the default viewer. So, a little bit of a difference there between securing the viewer and securing the site. If you secure the site, the viewer will still load and give you the opportunity to log in but if you secure viewer there's no way to even load the viewer.
So that is the basics of using fine-grained security. I hope you have fun with this feature and happy hacking on Geocortex!”
Learn how Geocortex Essentials can help your organization solve business challenges. Check out the Discovery Center to get a feel for the product.
We’ve been hard at work developing ways in which Web AppBuilder can be augmented using Geocortex Reporting 5, one of our powerful 5-Series products that can be used within Esri’s Web AppBuilder for ArcGIS®. This technology delivers high quality, configurable reports that meet the needs of your end users, and we're excited to show you how it's done!
In the webinar below, we examine how Geocortex Reporting 5 enables you to streamline the way you gather, organize and share data through these powerful reports.
The webinar also includes an example of how the Massachusetts Department of Transportation used Geocortex Reporting 5 to consume data from multiple sources, including ArcGIS Server and SQL Server, to produce a robust and high-performing report for use in Web AppBuilder® for ArcGIS.
View our “Enhancing Web AppBuilder for ArcGIS® with Geocortex Reporting” below!
With Geocortex Workflow 5, authoring workflows has never been easier. With a library of 170 pre-built activities that chain together seamlessly, you can covert even the most sophisticated business processes into a simple, guided end-user experience.
One of the things that we’re really proud of when it comes to Workflow 5 is its ability to automate virtually any task, so we thought it would be fitting to show you in this week’s Geocortex Tech Tip how to use our Workflow technology to automatically display a form for editing layer attributes.
“Hi, my name’s Jeff. I’m a software developer on Geocortex Workflow 5, and today I’m going to show you how to display a form using Workflow so that you can edit features in your layer.
Let’s get started!
On our display form activity, we’re not going to configure any form elements and that is because we want to dynamically display the form depending on the layer that we have. To set the dynamic form elements we’re going to use the ‘load’ event handler in the forms header. If we look in here the first thing, we need to do is get the layer using the ‘Get Layer’ activity and I’m going to be using a web map that has a layer with the ID ‘Service_Request_8759’. That’s going to get our layer and the next thing we’re going to want to do is add a form element for each field in the layer. So, we’re going to iterate over the fields in the layer. You can see we’re going layer.featureTable.fields and this feature table is a .NETism.
The first thing we’re going to do on our ‘For Each’ loop is just assign the field to a variable, so that we don’t have to access each For Each loop current item every time so this is a Create Value activity. Then the next thing we want to do is check if the field is editable, so we’re going to check the ‘isEditable’ property. If it’s not editable then we’re not going do anything because we don’t want to display anything.
So, then we’re going to create an object for our form element and we’re going to assign a few properties we’re going to set the description to the field alias and I’m going to set the items to an empty object, which I’ll come back to in a few minutes. Next, we want to decide which kind of view UI control to create for each field.
The first case we’re going to handle is fields that have coded value domains so in this if activity we’re checking if the field has a domain object and if that domain object has coded values. If it does then we’re going to want to show a dropdown box with the coded value domains in it. So were going to iterate over the coded value domains so you can see ‘domain.codedValues’ in our For Each loop here. And the first thing we’re going to do in here is just assign the coded value to the variable, so we don’t have to access the For Each loop every time and we’re going to create an object for the form item.
The ‘label’ is going to be the name of the coded value and the ‘value’ is going to be the value of the coded value. And then we’re going to set this item on our form element object. As you can see, I’m targeting the items property of the form element object. And we have to assign it a unique ID so we’re just going to use the pass of the For Each activity and we’re going to call toString on it because it has to be a string ID, and we’re going to pass in the object we just created. Next, we’re going to add the dropdown list form item to our form and we’re going to do this using the ‘Add Form Element’ activity. We have to provide a unique ID, so we’re going to use the name of the field and we have to specify the type of form element that we want to use (you should get some intellisense in here), we want to use a dropdown list and we’re going to put in our form element object that we just created.
Next, I’m going to show you how to do a number field. So, for this we have to look at the fieldType property of the field and in .NET, this is a numeration that is backed by integers, so we just have to compare it to its integer value, so the value for an integer is one. So, we want to create a format object for our number to ensure it appears as an integer - so to do this we set the precision to ‘0’, meaning no decimal places are shown and we want to set the step to ‘1’.
Next, we want to set our format object that we just created on the form element object, so we’re setting the format property on our form element object to the format object that we just created. Once again, we’re going to use the Add Form Element activity to add this to our form. This time we’re going to chose number and we’re going to use the field name as the ID. So next I’m going to show you a string field. So, the integer value of field type for a string is ‘7’, so we’re just checking for a ‘7’ so in that case we want to add a TextArea form element to our form. So, it’s the simplest case using the field name again.
Alright, I’m going to demo this for you in the Geocortex Mobile Viewer now.
Let’s quickly take a look at the Json in the feature layer that I’m using here. These are the fields in the feature layer, and you can see I have a string field called ‘REQUESTSTATUS’ that uses some coded value domains; there’s three domains in there. I’ve got a regular string field called ‘DESCRIPTION’ and an integer field named ‘SEVERITY’. So, this the workflow that we made to show the form elements will cover all three of these fields.
Let’s pop open Geocortex Mobile Viewer and I’ll show you the workflow. So, this is just an extremely bare bones version of the mobile viewer that I’ve configured solely for the purpose of showing you this workflow. So, I have the workflow on the task bar and if I click on it, you’ll see that I’ll get one form element for each of the fields that are editable. So, I’ve got my ‘Status’ element which is a dropdown box. I can choose the value, the ‘Description’ field is just a string field, and the ‘Severity’ field is just an integer. So, if I type in that I can see that it is an integer and I can step up my integer values.
And that’s how we create a dynamic form for a given layer. Thanks for watching!”
Interested in trying Geocortex Workflow 5 for yourself? Check out our Discovery Center and explore everything Geocortex Workflow 5 has to offer!
We are thrilled to announce that Geocortex has been officially designated by Esri as a Release Ready Specialty partner!
The Release Ready Specialty certification recognizes companies approved by Esri who are constantly keeping pace with their technology, have strong industry expertise, offer solutions, services or content based on the latest Esri software releases, and help users make smarter overall decisions using the ArcGIS® platform.
We want our customers to feel like they’ve made the most of their investment in Esri, and a major part of that is ensuring that they are always aligned and optimized with Esri’s constantly-evolving technology. By working closely with Esri, Geocortex has provided compatible software with every major and minor release of ArcGIS within 10 business days of general availability since the release of ArcGIS 9.3. Further, Geocortex ensures customers can take advantage of new patterns, APIs and platforms that evolve as part of Esri’s development of ArcGIS.
November 14th marked the 20th anniversary of International GIS Day, and at Geocortex we’re always inspired by the positive stories we hear from our customers who are using GIS in new and innovative ways to help make the world a better place to live.
We caught up with Greg Stanisci of the York Regional Police to chat with him about their use of Active Operating Picture, an extension for Geocortex Essentials that helps respond to emergency situations with reliable information.
How were your operations being carried out prior to making the decision to integrate a GIS solution?
Greg Stanisci [GS]: Before integrating our Active Operating Picture (AOP) solution, our Real-Time Operation Centre (RTOC) had to go hunting for data on important issues, which meant they were seeking data all day long. Now, our GIS solution gives us that data immediately, helping us identify priority calls and better manage our resources, so the overall impact has been an increase in efficiencies and a reduction in the risks associated with the lack of awareness around not always knowing what our priorities are.
What were some of your GIS goals prior to adopting the YRP Active Operating Picture?
[GS]: We believed that mapping technology was one of the best ways to visualize police information and bridge communication between our officers. Everything we do is location-based, and we wanted to interconnect GIS with our team of analysts, investigators, front line officers, supervisors and senior officers to better collaborate and respond to situations.
It was our goal to support a more data-driven strategy that revolved around utilizing our resources in the most efficient way possible. Ultimately, we wanted to empower our force with data, and use that data to drive the way we plan our operations.
Can you explain how York Regional Police is currently deploying AOP technology?
[GS]: In a nutshell, we’re using AOP to provide more information in real time to and from the many different members on our team. This ranges from a variety of different applications such as enhancing road safety, preventing crimes before they happen, locating missing people, and accessing information about known offenders. AOP enables us to better streamline the way these processes are managed.
Additionally, the analytics we use in AOP helps us analyze our police presence in a given area to gain more insight into historical deployment patterns, giving us the ability to plan future front line deployment more strategically based on the data we’re receiving.
Describe your how AOP supports your Real-Time Operation Centre (RTOC).
[GS]: One of the primary functions of the RTOC is to mitigate risks to officers in our community. Thanks to AOP, our operatives no longer need to seek important information like priority calls and other alerts, how many units are assigned and whether officers arrived at their destination safely – the information is delivered to them directly.
AOP gives us visibility into which of our officers are currently in the field, the sectors they’ve been assigned to, whether they’re responding to a call, as well as the details of the call itself. AOP also warns us when a patrol sector is empty so that we can actively manage that risk as well. This helps us empower the people within the RTOC with more information, so they can better support our officers.
We’ve worked with our RTOC team to compile a list of roughly thirty different types of priority calls. These priorities can be displayed very quickly and easily for them to respond to as they occur.
How has AOP technology been used to better deal with countering crime in the York Region?
[GS]: AOP technology has allowed us to make more intelligent and proactive decisions with our resourcing. We’re able to put officers in the right place, at the right time. We’re also training officers to analyze the various data points, like heatmaps, to better understand where they’re most needed. AOP helps us leverage location based data to identify priority patrol zones for officers, like areas that have higher gun violence or gang activity as an example.
What have been some success stories that have occurred since onboarding AOP?
[GS]: We’ve diffused quite a few situations since we’ve started using AOP. It has been used to ID suspects that committed a string of commercial break and enters, including a string of thefts that took place at various liquor stores. The technology allowed us to link together a series of prescription fraud cases, ultimately helping us identify the suspects. We were also able to make key arrests to several wanted persons due to the data we were able to relay in AOP.
Thanks to AOP, our ROTC -- as well as front-line officers -- are able to help deter crimes happening in real-time, such as a terrorist threat at Canada's Wonderland amusement park, and a bank robbery that was in progress.
Have all your officers been trained on the technology?
[GS]: Currently, all frontline officers and investigators have been trained on AOP technology. AOP is being used in both their cars and on their desktops. There are also some civilian administrative groups that are using AOP for planning and crime analysis purposes.
Thanks Greg! One final question - are there any plans for further use of GIS in future applications?
[GS]: We’re hoping to get further use of the “after action playback” mode, which can playback events and how units responded throughout the day. This can provide context on where our zones were created and the maps we drew to better assess how we dealt with a response.
It is also our hope to soon run workflows that convert individual unit points to lines to see how our officers and platoons drove during that date. This will give us a better idea on exactly where we were patrolling on a street level and determine which neighborhoods require a heightened presence.
Another future idea we had in mind was to develop a site to track bail checks that are done by officers on the road. This would allow an officer to use a form that would then update on the map, preventing duplicate checks from taking place in a day.
Finally, we’d like to explore how our officers’ GPS alerts are generated based on if they’re in a priority zone or near know offenders or other types of hazards.
GIS Day In Your Community
Every year on November 14th, GIS Day gives us a special opportunity to turn the world into a forum for one day, advocating the impact that geographic technology has on our everyday lives in ways that we may have otherwise taken for granted. Around the world, organizations host educational sessions to spread information, solutions and knowledge on how GIS is improving operations everywhere to make our cities cleaner, safer, better resourced and more efficient.
For more information on GIS Day, we recommend visiting the official website. It offers plenty of information about GIS events happening in your communities, as well as treasure trove of valuable resources.
We invite you to share your GIS Day stories with us in the comments section below!
There are a lot of benefits when it comes to server workflows, a new type of workflow available for users of the newly released, on-premises version of Geocortex Workflow. Server workflows can read and write files that exist on the server, send emails (as Noah demonstrated last week), run Python scripts, send HTTP requests to secured web services that the end user can’t reach from their browser, and carry out some other heavy-duty types of processing requests.
In this week’s Geocortex Tech Tip, we wanted to show you yet another feature exclusive to server workflows that we’re really excited about: Accessing a SQL database from a workflow. By calling a server workflow to do a SQL database query, the server workflow returns a data structure to the client, enabling it for use with a workflow.
Check out the video below to learn how this process works!
“Hi, I’m Ryan. I’m on the Geocortex Workflow development team. Today I’d like to show you how to query a SQL database in Geocortex Workflow 5. Let’s take a look!
I have a workflow here and it’s really simple, it has to display form activity and it has a drop-down list asking to pick or select a customer from a list. Now this list (at the moment) is just a hard-coded list of options, but I would like this list to be populated from a database. It’s something that we can normally do through an ArcGIS query, but that’s using the ArcGIS REST API to perform that query. If we want to go direct to the database, that’s something that hasn’t been possible until today inside Workflow and we’re going to use a new features called Server Workflows that are available in Workflow 5.8 and the on-premises version of Workflow.
What this is going to allow us to do is create a whole new type of workflow that is going to run on the server and it’s going to do our work to actually query the database for us. It will have access to activities that can query the database and then it will return us some results so that my client workflow, the workflow the end user is interacting with, can basically call the server workflow as if it were a web service. So, what we’re going to do is create a brand-new workflow and this is going to be my server workflow and I’m actually going to tell it that it’s a server workflow by switching to the info panel and selecting ‘Server Workflow’. This is going to change the toolbox to have a different set of activities that are available and some of the really powerful ones here are the SQL query activities.
So, the SQL query activity - a connection string - is going to allow me to define my query. I’ve set one up in advance here so I’m going to just populate the providers, this is going to be a SQL server database. I’m going to plug in a connection string, this is just some database sitting on the internet that we can use. I’ll quickly show you this table. It’s just a Microsoft Northwind database. There’s a customer table and it’s got a contact name field, and this field is what I want to populate my results with.
I’m going to run this query, and this is going to provide a data table output and what I want is this server workflow to provide that data table as the output to the workflow itself. There’s an activity called ‘Set Workflow Output’ and I can provide whatever name I like for this output, so I’m going to call it ‘contacts’ and the value is going to be sqlQuery1.dataTable, so just the result of that data table. When I save this, I’m going to call this ‘Customer Server Workflow’.
Okay, so my server-side part is done - it’s going to do a query and is going to return that data table as adjacent data structure to this client workflow and the client workflow - rather than using this manual list of options in that drop down - I’m going to change to use a sub workflow and I’m going to just start with a blank one.
Now in this, I want to run that server workflow, so there’s a run workflow activity, and I need to give it a URL. If I go back to my server workflow on the info panel, I can copy the URL, paste that in. That workflow didn’t have any inputs or arguments, so I don’t need to supply any, but it is going to provide a result and then what I want to do is I want to take that result - which will have a data table on it - and convert that data table into something that the form is going to be able to use. There’s an activity called ‘Get Form Element Items From Collection’ which will do that. So, the collection in this case is going to be my runWorkflow1 result, and contacts was the name of the property that I had assigned on that so we’re going to take that contacts collection, and I’m going to provide the name and value of that dropdown list (I’m going use the same field).
The last thing we need to do here is set form element items, so we have to actually tell the dropdown list to use these items. If I save that I should be able to run that.
I’ll just run this in the sandbox and there we go! I’ve got my list that’s coming from the database and if I pick a value and submit it, the reminder of my workflow is just to alert that value back, but we can now go on and do something really useful with that.
So, there you have it, we were able to create a client workflow running in the web browser. It calls a server workflow when it needs to do something server specific like do a SQL database query or send an email or some kind of server processing. That server workflow returns a data structure to the client and then the client is able to use that and carry on with that workflow.
So that’s how you do a query SQL database inside Workflow 5!”
Geocortex Workflow can extend your Web AppBuilder applications by turning even the most sophisticated business processes into a set of simple, guided end-user interactions. Check out our Discovery Center and explore everything Geocortex Workflow 5 has to offer!
November is an exciting month here at Geocortex, as we’re thrilled to announce the release of the on-premises version of Geocortex Workflow!
To commemorate this release, we thought it would be very fitting to have our next few rounds of Geocortex Tech Tips focus on our Workflow technology.
One of the key new features that the on-premises version supports is a new type of workflow called “server workflow”. These workflows execute on the server as a web service, compared to normal workflows that execute in the end user’s web browser, meaning that server workflows ultimately have access to resources that otherwise couldn’t be reached from a web browser.
An example of one of these resources – and where we thought we’d focus this week’s Geocortex Tech Tip on – is how to send an email with an attachment using this new server workflow. These emails can include multiple recipients including both CC’s, BCC’s. Check out the video below to learn how it works!
“Hi, I’m Noah and I work on the Products team. Today we’re going to learn how to send an email with the on-premise version of Geocortex Workflow 5. Let’s take a look!
So, today we’re going to learn how to create a server workflow that can send an email to a user with an attachment.
Right in front of me I have a client workflow which asks the workflow runner for a username and an email address and then runs a server workflow which is going to send our email for us.
Over here I have the server work form running. Right now what this server work flow does is it gets the workflow inputs with that username and email address, and it reads a data file for us. The data file is just some csv data that we're going to put in our email as an attachment.
The first thing we want to do is create the attachment to put on to the email. The content of the attachment is going to be our file. It’s going to be the bytes from Read File Bytes. Our content type is going to be text/csv since we’re reading since we have a csv file, and our file name is going to be data.csv. This produces an attachment object and as you can see here, 'This object should be passed to the Send Email activity’, so that is what we are going to sue next.
The send email activity has a To, a From, a CC, and a BCC, and the To, the CC and the BCC can all take either one value or an array of multiple values. For the value of To, I’m going to just use one value which came from our client workflow; it is going to be the username. Let's look for the user’s email. It's called email.
Now From, let’s use my own email. For CC, let’s CC a couple people just to show how the array works. I'm going to create a new array with the equal sign and then a square bracket and lets CC ‘firstname.lastname@example.org' and ‘anotherDeveloper@latitudegeo.com'. You could add as many emails as you like to the CC, the BCC, or the To fields on the send email activity. Let's leave the BCC empty. Let’s make our subject ‘Email techtip’. Now the email body can either be an html body or just plain text. Let's make it some html.
First, let make a header. And let's make the header say‘The Data’. Then, let’s make a paragraph and let’s address our user. We’re going to grab the user input we got from earlier. We’re going to go to the inputs, and we’re going to get the user field. Let’s end our paragraph and end our string. Here’s a little html body with some user input writing here. Now one important thing to know is that it can be dangerous to let users input their own information into an html string, so what I did in the client workflow is I made sure to escape the user input and make it safe. Let’s go back and see that.
The users input, prompt1.result is passed into the encodeHtml function. This function ensures the users input is safe to put in an html string.
Now that I have the body all set up, let’s attach my attachment from earlier. And then, let’s say true to Is Body Html, so the email will actually render it as html and not plain text. Let's save our server workflow, and let's go back to the client workflow, and let's run it in the sandbox!
Let's send the email to myself (just cause then I can open it and we can see). The email got sent! Let’s go and check my inbox and see what’s there. There it is, 2:37pm! Here’s the html heading that got rendered. My name got injected right in here, and the data got attached and we see CC’d‘email@example.com', ‘anotherDeveloper@latitudegeo.com', and it’s to me and it is from me. Let’s open up the data and just show that it got transferred correctly. Yup, that looks all good.
So that is how you send an email using Geocortex workflow 5 and the on-premise server addition of GeocortexWorkflow.”
Geocortex Workflow can extend your Web AppBuilder applications by turning even the most sophisticated business processes into a set of simple, guided end-user interactions. Check out our Discovery Center and explore everything Geocortex Workflow 5 has to offer!