Nintex Workflow – Looking at the query list action.

Not applicable
0 1 9,625

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

1 Comment
Canvas Initiate

Some sequential screenshots of the workflows themselves going through these various steps in Workflow Designer would be greatly beneficial to the information that is being presented here.