Stop me if you’ve heard this before…
Remember when you bought your Nintex Workflow subscription and 20 or 30 workflows seemed like an inexhaustible supply? And then one day you opened the Workflow Designer and saw something like this:
“Thank you for using the Nintex Workflow Platform. Your organization is currently using 80% of your production workflow entitlements. Should you need to increase your entitlements, please contact firstname.lastname@example.org.”
Do you also remember hearing that workflows with five actions or fewer don’t count against your entitlements? It says so right here. In this and the next related blog post, I’ll share some techniques I use to reduce “borderline” workflows with six to nine Actions to five actions while maintaining full functionality.
Original workflow before changes: 7 Actions
In this example, the SharePoint list “Expense Approval Requests” has two columns requiring items to be looked up in other lists to drive the behavior of the workflow.
- The Flexi Task approver is looked up in the Approvers list
- Purchasing advice needed in the notification to the Requester is looked up in the Expense Type list
The workflow is seven actions to start. It contains list item queries to get the Approver from the Approvers list and the Purchasing Advice from the Expense Types list. These values are stored in Workflow Variables that are used in the following Actions when assigning the Flexi Task and notifying the Requester:
First method to save Workflow Actions
The first method is somewhat of a “no-brainer” in this scenario. Since the Expense Type is a lookup column, by adding the Purchasing Advice column from the Expense Type list needed in the workflow to the Lookup column settings in the Request list like so…
… it would then become available to use directly in the body of the email to the Requester, and we wouldn’t need to use a list item query or even store it in a Workflow Variable in the first place:
Second method to save workflow Actions
The second method is much less obvious and I’m going to describe it for replacing not only the Get Approver action but also the Get Purchasing Advice action, on the assumption that for some reason we can’t or don’t want to add the Purchasing Advice column to the lookup.
This method leverages the fact that Workflow Variables (which we were populating in the two actions highlighted above) persist from the start form to the workflow upon initiation. By populating the variables with the values from the related lists in the start form, we no longer need the list item query actions inside the workflow.
Populate lookup values in form instead of Workflow
Step one. Add a Panel to the workflow start form with calculated value controls to look up the values from the related lists and store them in the Workflow Variables:
Step Two. Configure the control settings of the calculated value controls:
the Formula is:
lookup(“Expense Type”, “Title”, parseLookup(ExpenseType), “Purchasing Advice” )
Do this for both lookups.
By previewing the start form, we can see that when the Start Workflow form runs, the correct lookup values are calculated based on the user entries in the Expense Type and Amount fields:
Hide the calculated fields
And, finally, we might want to hide the calculated value fields from the user in the start form. Create a rule for the panel with a When condition that always evaluates to True and hides the control:
Now the panel will be invisible, and when the workflow begins, the two Workflow Variables will already be populated and we can eliminate the two query list actions, bringing the number of actions in the workflow to five, and now you’ve “saved” and “earned” one production workflow entitlement for your license!
Drop me an email at email@example.com if you have any comments/questions/ideas.
Subscribe to this blog so you don’t miss more ways save on Nintex Workflow licenses – there are two more coming in an upcoming post.