There’s Something About Forms

“Warning: The guys who did ‘Workflow for SharePoint’ and ‘Workflow for Project Server’ bring you a forms story.”

For those of you who haven’t taken a look at Nintex Forms for a little while, I think it’s time to revisit. Simple fact is that while you’ve been ‘merrily’ going about your day-to-day, Nintex has been beavering away to bring some really powerful enhancements to the product.

I’m going to give you a few examples of where these enhancements could be used to build flexible business applications by getting into detail around an order building form.

First, it’s probably worth me listing some of the basic features, just so we’re all on the same page. Nintex Forms has:

  • An in-browser design canvas
  • An undo and redo button so you can step back changes without losing your progress
  • Version control
  • CSS and JavaScript support
  • Import and export functionality
  • Format copy and paste
  • One-click multiple layout creation (for various mobile platforms such as iPad and Windows 8 mobile)
  • Mobile app support for IOS and Windows 8 devices (Android supported first half of 2014)
  • Preview support to test runtime functionality
  • Ability to create additional SharePoint columns straight from the designer
  • Variables (allows storing of form data, formula based values that can make use of runtime functions and many more uses)
  • Rules engine that can affect other fields and sections on the form to show, hide, disable, custom formatting etc.)

This isn’t exhaustive, more to give you a flavour. And the nice thing about this feature list is that they are all available in Nintex Forms 2010 and 2013 (1.4 and 2.2) so there is no ‘poor cousin’ as far as Nintex is concerned.

Ok, so what about specific form building functions that are available? Well let’s cover them off by exploring a business process. Here’s the scenario:

Company X has a list of customers and a list of products with prices. Let’s call them SauceSource Inc.

Let’s call them SauceSource Inc.

They manage their list of products and customers’ information in SharePoint lists (don’t worry, there are alternatives such as line of business systems, but for now…)

What they need is a way for the sales team to build up orders for these customers as and when required. The additional challenge is that certain customers are able to buy products at one price, while others are only able to buy at another.

There is also an order list to which the order form is attached.

Here’s what the form looks like:

TheresSomethingAboutForms_Image1

And here are the three lists that comprise the solution:

TheresSomethingAboutForms_Image2

TheresSomethingAboutForms_Image3

TheresSomethingAboutForms_Image4

Note the column for ‘Customer Type’ in the customer list and the two columns in the product list with differing prices. We’ll see this in use later on.

Now let’s look at how the form is put together so you can start to get an understanding of the capabilities of forms.

You can see that the design canvas is broken down into 3 main areas; the design space in the middle, the toolbox on the left and the ribbon at the top.

TheresSomethingAboutForms_Image5

So let’s break this form down into sections and have a look at what’s going on.

The first section is all about the customer. The first field is a lookup field.

TheresSomethingAboutForms_Image5a

We have hooked it up to our customer list and specifically the short code column. This will allow our sales team to select the correct customer for the order.

TheresSomethingAboutForms_Image6

Underneath you will find another new element, the ‘Calculated Value’ field. Well, I say new. It’s not. But the way in which we are going to use it in this scenario is, via the new funtion- Lookup(). This powerful and flexible field can be a real workhorse in forms, with scenarios ranging from on-form mathematical functions such as totalling, percentages etc, to displaying complex lookup info from elsewhere.

TheresSomethingAboutForms_Image7

This latter scenario using the new ‘lookup()’ function is what we will be using here . The group of calculated fields is going to use that function based on the customer you select in the customer dropdown field and pull back their address.

TheresSomethingAboutForms_Image8

Formula: lookup(“Customers”,”ID”,CustomerCode,”Customer Name”)

Now that we have selected the customer, pulled back their address and confirmed the address is correct, we can start to build the order up. Below is the repeating section with the controls we need.

TheresSomethingAboutForms_Image9

Repeating tables are not new to Nintex Forms, but there have been improvements to what controls you can add such as people picker and lookup fields. Here we are going to use a lookup to the product list and pull back the correct pricing for that particular customer, along with the current stock on hand number, show the line total and show warnings when we try to order more than the stock total.

TheresSomethingAboutForms_Image10

So let’s take a look at this from left to right.

The lookup field is simply configured to pull back the product names.

TheresSomethingAboutForms_Image11

Next we have the second appearance of our new ‘Lookup ()’ function in a calculated value field, this time configured to pull back the correct unit price of the selected product depending on which customer is selected.

TheresSomethingAboutForms_Image12

Formula: If(Customer Type==”A”, lookup(“Products”,”ID”,LI_Product,”Price A”),(If(Customer Type==”B”,lookup(“Products”,”ID”,LI_Product,”Price B”),””)))

Next is a single line of text field to capture the order quantity. This field is being used as part of a rule attached to another field that only shows a value when the ordered quantity is greater than the on hand stock level (we’ll see that shortly).

Another appearance of the ‘Lookup()’ function, this time bringing back the total stock on hand numbers.

TheresSomethingAboutForms_Image12a

Formula: If(Customer Type==”A”, lookup(“Products”,”ID”,LI_Product,”QOH”),(If(Customer Type==”B”,lookup(“Products”,”ID”,LI_Product,”QOH”),””)))

The penultimate ‘Calculated Value’ field is totalling up the line cost.

TheresSomethingAboutForms_Image13

And finally that field which will warn the orderer if there isn’t enough stock on hand to fulfil the order.

TheresSomethingAboutForms_Image14

Formula: If(or(Quantity<=lookup(“Products”,”ID”,LI_Product,”QOH”),Quantity==””),””,”Chk Qty”)

There is a rule on this field (right click > add rule) which looks a little like this:

RULE: not(or(Quantity<lookup(“Products”,”ID”,LI_Product,”QOH”),Quantity==””))

Importantly here, the rule has a hide action on it.

Finally, we total up all the added lines using another ‘Calculated Value’ field.

TheresSomethingAboutForms_Image15

TheresSomethingAboutForms_Image16

All that remains once we’ve built our order up is to submit it to the SharePoint list.

At this point, there are a number of enhancements that you could make using Nintex Workflow. You’ll have noticed at the end of the video that, rather than giving the form a unique order number at runtime, I’m working it out as the first step of a workflow. This workflow could go on to perform any number of activities as part of a larger ordering process.

The following are just some ideas that could be used to extend this scenario using other Nintex products and integration partners.

Extending

  • Pull the customer information from CRM perhaps, and the product list from a SQL based stock system
  • Kick off a workflow to raise a job to finance against which to match a PO
  • Update an SAP finance system using one of the three SAP integration options offered by Theobald Software which, incidentally, has Nintex Workflow actions ready to go straight out of the box (http://theobald-software.com/en/products/erpconnectservices/nintex.htm)
  • Save a pdf copy of the order form as a record using Muhimbi (which ships with Nintex Workflow actions and integrates seamlessly. See a great post from my Asia Pacific colleague Dan Stoll here: http://www.sharepointpub.com/using-nintex-forms-with-muhimbi-pdf-creator-for-sharepoint/)
  • Email a pdf of the order form to the customer for verification before processing it further
  • Send a picking list to the warehouse (perhaps using a task that can be accessed on a tablet, so that the warehouse staff can tick off the order as they pick it??)
  • Updating the stock levels in a stock system once the items are picked
  • Marking the order as dispatched once sent out
  • Create an invoice to be dispatched with the order
  • Taking the values in the form and pumping the info into a custom word order template which is already used by SauceSource Inc.
  • Branding the form using the company style guide

The list could go on and I’d love to hear your thoughts on how you would want to see it extended.

And don’t forget that Nintex Forms can be used as part of your complex business processes by fully integrating with Nintex Workflow, so all of those variables and that great workflow context information can be used to power workflow start forms, task forms and request for information actions at the click of a button.

Comments box now open for business!

Not using Nintex Forms for SharePoint yet? Want to find out more? Try going here

 

Leave a Reply