Vadim Tabakman

Form Before ....... Form After

In the past, I've been asked for the best way to have an approval form where some more information will be required from the approver.

Rather than InfoPath (which I've generally had headaches with) or developing a custom form in C# to extend the Flexi Task action form, I've nudged people towards using the Request Data action or the Assign a ToDo Task.  These two actions were specifically made to get users to fill in forms.

Well, I'm now moving away from my suggestion above and leaning towards a Nintex Forms solution.

Problem

I want to send an approval request to a user.  The options they have for the approval will be Approve, Reject and More Data.

More Data will mean that they don't approve or reject the task, but instead would like more information about something.  In order for someone to provide more information, the approver needs to also fill in some details that we can then pass on to the appropriate person.

To facilitate this, first we add the 3rd outcome, "More Data" to the Flexi Task acton:

Flexi Task 3rd Outcome

Once this is done, we can then edit the task form using Nintex Forms:

Edit with Nintex Forms

The main thing to do now, is to add some controls so that the approver has a form to fill in, as well as provide a decision on this task.  As I'm interested in functionality and not asthetics at this stage, I simply put a Panel at the bottom of my form, add a label and add a Multiple Line of Text control.

More Data Panel

I surrounded my main Panel control with a border so that it stands out for now.

I wanted to add one more feature to this.  I only want a user to fill in that part of the form, if "More Data" is selected as an outcome.  In order to facilitate this, you can create a Rule.  This rule would be specifically for the parent panel above (that you see with border).  The rule will be that this panel will be hidden, if any outcome, other than "More Data" is selected.

Rule

You may be asking, why am I comparing the Decision field to the number 3.  The number 3 is the internal ID of the outcome that we have in our Flexi Task action.  To confirm that value, I found that the easiest way was to query the Nintex Workflow database for the "ConfiguredOutcomes" table.  You'll see the ID there. Alternatively, you could add a Calculated Control to the form temporarily and link it to the Decision control.  Then when you select the outcome, the calculated column will display the numerical ID.

At this stage, if you were to save this form, save the Flexi Task action, publish the workflow and run it, the approver will get this form and they'll be able to fill it in.

We are missing one crucial component here.  How do we read the data from this form, since the controls aren't connected to SharePoint fields?

Reading the Control Values from Nintex Workflow

In forms like this, there is a hidden item property called "Form Data".  This is XML that you can the query using the Query XML action and pass in the appropriate XPath expression to extract the data you need.

If you're designing a form for SharePoint List Item, the "Form Data" is a property of the current item the workflow would run on.

In our case, the "Form Data" is an item property on the Task in the Workflow Tasks list.  To get at it, we need to find the ID of the task that the user just filled and then we can use the Query List action, to query for the "Form Data" property.

First, create a List Item ID variable in your Nintex Workflow and you can then use it in the Flexi Task action to store the Task ID into this variable.

Store Task IDs In

The Flexi Task action can then be followed by a Query List action to query the Workflow Tasks list, for the Form Data field of the task whose ID matches the variable "listItemID".

Query List

The result of this action is stored in a Nintex Workflow Text variable. The contents will be a bunch of XML that looks like this :

<?xml version="1.0" encoding="utf-8"?>
<FormVariables>
  <Version />
  <TextMoreData type="System.String">The procurement document is missing.  Please upload that the appropriate library and link it to this item</TextMoreData>
</FormVariables>

Each control that you add to your form, you will need to give it a name.  For my test, I created a Multiple Lines of Text control called "TextMoreData".  You can see in the above XML that the xml node has the same name as my control.

I can therefore use an XPath expression like //TextMoreData to pull out the text and store it in a variable.

Query XML

If you have more that one control in your form, you can add further XPath expressions to the Query XML action.  This is a more efficient way of processing, rather than having multiple Query XML action.

Now that we have this data, you can use it as it suits your Business Requirement needs.  In the workflow I was working, I'm using a State Machine so that the approval goes out.  If the approver needs more information, the data they fill in is extract from the form, I jump to the next State and use that data in the Task Description and also in the email that goes out to the approver to review this item/document and they will know exactly what the original approver wanted.  Once they complete this task, it jumps back to the original state and resubmits a new approval task to the approver.

Workflow Design

Workflow Design

*** NOTE for Nintex Forms 2013 Users ***

It looks like the rule in this form needs to be tweaked.  You need to compare it to a value instead of the text 'More Data'.

To find out what that value is if your environment, you can temporarily add a Calculated Value control and configure the formula to use the Decision field.  When you publish and view the form, select the 'More Data' option and the Calculated Value control will tell you what the ID is meant to be.

 

Downloads

Posted by Vadim Tabakman Sunday, April 7, 2013 8:56:00 AM Categories: Flexi Task Log in the History List Nintex Nintex Forms Nintex Workflow Query XML Rules SharePoint State Machine
Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Wednesday, October 9, 2013 8:01:36 AM
Arun

re: Nintex Forms/Workflow - Request for ApprovalTask with a Data Entry Nintex Form

Hi,

I am using Request for Approval task in Nintex workflow. I have checked Delegate option there. I am displaying my customised form and not nintex default form. How to call it through my custom code?

Any suggestion would be appreciated!!!

Thank You

Thursday, October 31, 2013 6:55:34 AM
Stuart

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

another cracking tip Vadim, just wondering about doing the reverse - create a task and assign to a holding user, use the update xml action to fill in the variables, then reassign the task to the actual approver! Could be a way around some of the content type issues. And if you're really sneaky, use some html code in the variable to handle layout.

Saturday, January 25, 2014 2:21:12 AM
frans

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi Vadim,

Hope you can help me please. Im stuck with this one.

 

I build an CAPEX workflow approval based on this Flexi task approach you gave. it was working fine and all of a sudden i get errors in the workflow. It just stopped working. I get "workflow error something went wrong" and i cant seem to fix it. I am not a Sharepoint expert. I taught myself Nintex Forms and Worklfow. It worked fine. What can I look for ? Will appreciate it if you can look at the workflow for me an advise.

I can mail you the export.

Much appreciated.

 

 

Saturday, January 25, 2014 8:59:52 AM

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi Frans, with this type of error, if there is no more information in the workflow history, contact your SharePoint admin, tell them what time the workflow failed and get them to look for Workflow Infrastructure error messages in the SharePoint log files on the servers. cheers, Vadim
Tuesday, January 28, 2014 8:47:46 AM
Remzi

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Frans,

Check the workflow history as Vadim suggested.

Make sure nothing is changed in the list or library that you have published the workflow. (columns, list settings and so forth)

Try republishing the workflow.

Remzi

Tuesday, February 4, 2014 2:11:45 AM
Frans

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Thanks for the feedback guys. I rebuild the workflow from scratch and that fixed the problem. Something must have gone corrupt.

 

Regards

 

 

Wednesday, March 12, 2014 5:06:54 AM
Ian Hall

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi,
I'm working on a similar workflow but for multiple approvers. How would switching the state machine affect tasks that were still in progress when one task a task is indicated as needing more data?

Cheers

Ian

Wednesday, March 12, 2014 10:35:41 AM

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi Ian,

It really shouldn't affect it, but you will need to make sure you design your workflow in such a way that you're able to get at the data when you need it.

cheers,

Vadim

Thursday, April 3, 2014 11:16:44 AM
Rhonda
Gravatar

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi Vadim - do you find that once you have modified the default task form, the validation for required comments on rejection goes away?  No matter how small an update I make to the form, once the workflow is saved and published, all out of the box validation goes away and the approver can reject without entering comments...Do you know how to fix this?

Thursday, April 3, 2014 12:20:54 PM

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi Rhonda,

I actually never noticed this.  This sounds like it could be a bug.

If it's easily reproducible, which it sounds like it is, can you email Nintex Support. They would need to open a bug fix request for it.

cheers,

Vadim

Monday, September 29, 2014 10:26:56 PM
ravi
Gravatar

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

I am unable to display item properties on workflow task list.

Currently it is redirected to following path (_layouts/15/NintexWorkflow/WrkTaskIP.aspx)

How to make it redirect to this path _layouts/15/NintexWorkflow/ApproveReject.aspx

Wednesday, April 22, 2015 5:18:13 PM
ankita
Gravatar

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi,

 

I have a similar requirement. Just that approver does not fill any information. But send the form to user for more information

 

User updates the form and submits it back to approver.

 

But during this time, approver's decision is not taken into action and status of task shows "pending"

 

can you tell me what was the outcome behavior chosen by you?

Thursday, April 23, 2015 7:17:23 AM

re: Nintex Forms/Workflow - Flexi Task with a Data Entry Nintex Form

Hi ankita,

sorry, but I'm not sure what you are seeing.  Are you saying you send a task to a user and they respond, but the task is stuck on Pending?

cheers,

Vadim

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register

Statistics

  • Entries (279)
  • Comments (1769)

Categories