060614_0058_NintexWorkf11.png

Nintex Workflow – What to do when nobody is home ?

This question comes up fairly often, and it may seem like a no brainer but here it is any way..

You have a workflow and it is calling an external web service.. Now for whatever reason the call has failed.. A 99% of the time this has nothing to do with the workflow itself, it is just the service didn’t respond for any number of reasons.

A trick that I have been doing for a while now is to place the webservice call inside a loop along for a pause action. “But how does this help?” you ask.. Well by using the OOTB feature of capturing errors of course J Opening the “Call Web Service” action scroll to the bottom under advanced. Change the settings to “Yes” capture error, Create a “Yes/No” variable to store whether or not there was an error and then if you wish to be emailed or store the error within the WF History, create a multiline Text Variable to store the error message.

Continue reading

042114_1014_NintexForms3.png

Nintex Forms – Behind the curtain. Using a repeating section in a Panel that scrolls

A requirement came up the other day, and for intents and purposes was that they had a repeating section and they needed to contain it within certain dimensions within the form.

Now with my InfoPAth hat on, I just could not think of how to do this, but then sparked that I was going to be using Nintex Forms.. Now armed with the power of CSS figured I could just add a new class to look after the overflow..

So with that thought, add a panel to your form and size to accept height and width. Open the settings of the panel and add a CSS class of “scroll” (or whatever you choose)

And also turn off the “resize at runtime”

At some stage,, probably now J You can add you repeating section to the panel and add the fields you require.

Now to add the class to the form..

Select Code
1
2
3
4
<span style="color: #282828; font-family: Segoe UI; font-size: 10pt; background-color: white;">.scroll
{
overflow-x:auto;
}

Publish your form and test it out

Enjoy.. J

021614_2146_NintexForms1.png

Nintex Forms – Reading Query String Values

Some time back (early last year) my main man Vadim blogged about reading query string values by using little bit of custom JS http://vadimtabakman.com/nintex-forms-reading-query-string-values.aspx .. This worked great.

However in the spirit of making Nintex Forms simple and easy to use, the product team heard the calls.. It was only recently that I found this little nugget siting the ‘Inline Functions’ fn-GetQueryString()

As described “Gets a value from the key within the query string. fn-GetQueryString(key name to retrieve)” I figured this would be pretty easy to use.. And it was..

Firstly create your Nintex Form and open the field that you wish to be populated with the url parameter. Change the Default value source to ‘Expression’ and then in the Default Value add the Inline Function.

Now to make this work you just need to add the URL parameter to the URL String. https://Server/sites/Lists/Query%20String/NewForm.aspx?City=Melbourne

This also works with Nintex Live.. However please note, it doesn’t work with the shortened URL, so you need to get the fully resolved string either after the shortened one has resolved, or just don’t use the shortened URL.

Enjoy J


Warning: Illegal string offset 'width' in /home/sharepub/public_html/wp-content/plugins/jetpack/class.photon.php on line 384

Warning: Illegal string offset 'width' in /home/sharepub/public_html/wp-content/plugins/jetpack/class.photon.php on line 384

Warning: Illegal string offset 'height' in /home/sharepub/public_html/wp-content/plugins/jetpack/class.photon.php on line 385

Warning: Illegal string offset 'height' in /home/sharepub/public_html/wp-content/plugins/jetpack/class.photon.php on line 385
word

Nintex Workflow – Open a MS document in the browser from email or task description

Just a short one today.. It was recently brought to my attention that when you manually link to a document inside an email it prompts the end user to “Save As” rather than just opening it within the Office Web App, which is what you were expecting to do considering the document lives in SharePoint. Now I’m not going to explain as to why this happens, because frankly I don’t know and I’m really not going to research it J There is a way however you can defeat this issue with Nintex Workflow, and SharePoint Designer no doubt..

In Nintex Workflow firstly we need to add a “Build Dynamic String” action to your workflow. In the configuration window pop in the WebURL token and then depending on what sort of document you wish to open you’ll need to add the relevant Web App link..

Word Docs – {Common:WebUrl}/_layouts/WordViewer.aspx?id=

PowerPoint - {Common:WebUrl}/_layouts/PowerPoint.aspx?PowerPointView=ReadingView&PresentationId=

Excel - {Common:WebUrl}/_layouts/xlviewer.aspx?id=

After ?id= you need to add the URL of the document either direct or in form of a variable. You should end up with something like:

The &Source= parameter is optional, and if you use it this will be the URL that the browser goes to when you close the document.

Once this is all done, store into a variable and then insert as a link into your email / Task description etc J

Enjoy..

011014_0106_Dawnoftheun11.png

Dawn of the unbound data column

Unbound data .. Well it is something that is OOTB with SharePoint but only pops it head out (gets created) if you use InfoPath to create a custom form. So it isn’t any kind of Nintex Black magic. But if you are still scratching your head, wondering “WHAT is this guy on about ???”

Unbound data is data that has been entered into fields within a Nintex Form that aren’t connected to a SharePoint Field that is part of the content type..

So for example:

A field that is connected directly to a SharePoint List Column would look like this

A field that isn’t connected looks like this:

Now these fields act and behave just as any other connected fields, however obviously the big difference is that data entered into them isn’t stored within the confines of the content type… Or is it. Similar to InfoPath, Nintex Forms stores it unbound data to a hidden column called ‘form data’ where all the unbound data is stored as XML.. so now that we know that.. If you are familiar with Nintex Workflow you would know there is a ‘Query XML’ action J

Putting some data into the list item, and into the unbound data field, we can now start figuring out the schema.

Whilst this process is very far from difficult, it could be a little fiddly.

First thing we need to do is create a new workflow.. I’m calling mine ‘Get XML’ but this most probably would be your main workflow, so please name it appropriately. Once I’m ready to start building out the workflow, at this stage all I need is 1 action. That action is “Log to History”

Open up the ‘Log to History List ‘ action to configure it out. You’ll notice that you have an Item Property that is normally not there.. ‘Form Data’ This is the one you are after. So what we are doing here is logging the contents of the ‘Form Data’ column to the history list.

Save this and publish the workflow. Now run the new workflow on a new list item. To do this select the item, and click on workflows in the ribbon.

And then select the workflow you just created and start. Once this has been done, opening the item context menu select Workflow History.

Listed will be your completed workflow. Select this and the graphical history will be shown. To get to the contents of the action we need to expand the history detail. Select in the Workflow Information window ‘click here to show detailed view’.

On the detailed page, we can now see the contents on the ‘Form Data’ column. Copy and paste this as we are going to need it.

Going back into edit your workflow, we can now either delete or disable the ‘Log in History List’ action, and we need to add the ‘Query XML’ action

Inside the ‘Query XML’ action you need to change the default ‘XML Source’ to XML from URL and then paste in the ‘Form Data’ content you copied from the history.

If you are comfy with XPath, fill in the syntax to retrieve the Unbound Data – Data that will filled in. Or if your like me and would rather use a tool, select the ‘XPath Builder’ button. Drill down until you have the right field and then apply.

Repeat this if you have multiple fields you wish to get data from.

Now that you have got all the XPaths that you require, create variables for each of the fields, and enable those in the relevant places in the action. Finally replace the XML that had pasted in, with the Item Property ‘Form Data’

All done.

You can now go ahead and use the Variable (notice mine ‘var unbound’) in your workflow wherever it is needed.

Enjoy J

101313_1125_NintexForms1.png

Nintex Forms – Using the runtime inArray on multi select

Not being from a dev background. But having enough knowledge to make me dangerous. I tend to sometimes over engineer / think things. This was no different again the other day when I was sitting there trying to nut through a request from a guy who like me probably should have known the answer to this.. But alas, we both succumbed to the same fate and had to ask for help.. So I asked my mate Tom @_TomShirley, who has featured a few times in my blog already.. He pointed out quickly that we needed to use an array in our conditional rules.. And this is why…….

What we have is the following:

  • SP List with fields
    • PersonType, checkbox (multi)
      • Staff Name
      • Contractor Name
      • Public Name
    • StaffName (People Picker)
    • ContractorName (Text)

Using Nintex Forms, have 2 panels with fields in as below.

If the box Staff is selected the Staff Panel should display and the NonStaff Panel should hide. If Contractor or Public is selected then NonStaff
Panel should display and Staff Panel should hide. If all options selected then both panels should be displayed.

The syntax works, PersonType!=”Staff” (to hide the Staff Panel) but we also need to do an OR() or something.. and no matter what I threw at it, the logic just didn’t seem to stand up..

Enter Tom.

First thing he says, right you are dealing with an Array. Scratching my head, we put a calculated value control on the form and set it up to render the value of the ‘PersonType’ control. With all boxes selected we got a value [Staff, Contractor, Public]

Ah ha.. right ok, so this is why our conditions have been failing, because they are all based on single values. So now putting my workflow hat on, I’m thinking “Ah these are just like collections” !! Queue penny drop..

Ok so now with some enlightenment in the room, we get hold of the inArray function.. And with the use of my old trusty friend w3schools knock out new conditions for the rules. Firstly we have the rule to hide the Non Staff Panel..

On the Staff Panel;

Once published.. This is what you get

That’s it.. Grab a copy of the Form from here

Enjoy

092213_1158_NintexWorkf3.png

Nintex Workflow – Who to choose? Looking at the query list action.

A common scenario with workflow is that a task needs to be sent to somebody.. But how do you go about choosing who that somebody is, if they can change depending on the data being submitted? In reality you can store that information in the workflow, but this leaves you with the issue of having to edit and republish the workflow every time one of the approvers changes.

The best way to complete this function is to use a second list with your approver’s data and filter information coupled with the “Query List” action in Nintex Workflow. Now this isn’t the only thing you can use this method for. Below I’ll go through just a couple of examples and if you have any other ideas or things that’s you do let us all know in the comments J

Lookup Manager of Department.

Using the out of the box “Manager” function may not work especially if the initiator is 2 or 3 levels down, but requires the head of the department to sign off. For this, we can use the list to Store the department name with the manager for that depart. The workflow can simply query either AD or the user profile to assess what department the initiator is in to retrieve the right manager for the approval.

So above is the list of managers that we have to choose from, and their corresponding department.

Now you wouldn’t have both “Query LDAP” and “Query user Profile” you can pick either one. It could also be a case where you could use the “Execute SQL” or “Call Web service” action to retrieve the Department information from Human Resources system. Regardless of what method you use to get the initiators department, store this information to a variable. In this example I have stored it to ‘varDepartmentFromProfile‘. I have also created a second variable ‘varDepartmentFromMasterList‘.

Using the ‘Query List’ action, we can now go about getting the info.. First select the Master List (In this case it is called Department Managers), then expand the Filters and adjust the filters. To retrieve the appropriate manager, first select the column we want to filter on in the Master List (Department). Then use the operator ‘is equal to’ against the department value we pulled from LDAP/Profile/ External system etc.

At the bottom of the ‘Query List’ action select the Manager Field from the Master List as the information that we want and store this to the second variable we created ‘varDepartmentFromMasterList

Now that this is done, use the ‘varDepartmentFromMasterList‘ variable in the ‘Assignees’ field in whichever task action you are going to use.

Get Approval Manger based on Department and approval Limits

Expanding slightly on the above, add a third column to the Master List and call it ‘Approval Limit’

Now in the list you are running the workflow on, may have a total amount.. This could possibly be a requisition request, purchase order, Travel Approval form.. If I had entered into the list, let’s say a travel request for $6456.00 and I’m in the Marketing team. The Query list action will retrieve the user account ‘NW13-User04′. I can now go ahead and assign the task to that user as they have the appropriate approval limits to review my request J

 

Ok so you see where I’m going with this.. What other examples have you got? Let me know in the comments and I’ll attempt to build them out J

Follow

Get every new post delivered to your Inbox

Join other followers: