Showing results for 
Search instead for 
Did you mean: 
Not applicable

Request Data Prefill from List Item

Jump to solution

I'm creating an HR employee lifecycle workflow; hire, transfer, promote, terminate.


The workflow is initiated by HR.  The work flow first asks the supervisor what access and applications etc. the employee will need.  This is done via a REQEUST DATA action.  Those responses in the web form are captured in variables of a content type for the supervisor's responses.


Department relevant responses from the supervisor are then separated and sent via a different REQUEST DATA action email to each task worker for each department .  Let's say to HR and we'll use salary as an example.


So the supervisor has stated the new employee will have a salary of $1,000,000/year.


The content type to capture HR's responses in the REQUEST DATA is unique for the HR dept. So the HR worker clicks the link from the REQUEST DATA email (the email lists a salary request of $1,000,000) and is shown the form for HR's content type.  One item is salary.  After HR enters the salary into their system, they would list the salary granted in their form and then an UPDATE MULTIPLE ITEMS action item would update the employee's list item from all the variables that captured HR's responses.


When the employee is new, it makes sense that the employee's salary line shown to the supervisor and HR worker is blank; the employee has never been granted a salary.


However, after some time, that same employee is promoted and the supervisor is again asked for a salary.  In this case it does not make sense for the salary to be blank.  The employee has a salary and the list item that represents that employee shows a salary.  So when the supervisor and task workers receive their REQUEST DATA, the list item's current values for that employee should be shown so that each task worker knows what to change and what  to leave as it.


I have tried to use the QUERY LIST action item to preload the variables, but this fails.  Probably b/c the workflow item lives in a different list.


Anyway, I just need to know how to harvest the current setting from the list item and prefill a REQUEST DATA.



Labels: (3)
Tags (1)
0 Kudos
1 Reply
Workflow Hero

Re: Request Data Prefill from List Item

Jump to solution

When creating a content type in the Request Data action, you can provide a default value for a field but you cannot provide it a value of an existing item. When you assign that field to a variable it is only to store the input into that variable. So it will always lose its previous value.

But you can display the value of the current Salary in two ways. Edit the form of the Request Data task with Nintex Forms and either add a variable to the form or add a List item control to the form.

The variable field will display what ever the value of the variable is at that time. So just preset the value in the workflow by doing a query and set the variable.

By adding a List Item control, you provide the list and list ID to display on the form. When you do this all fields of the item are displayed, but you can change up the appearance with further options. To get the ID, you can use a reference. So I imagine you would have a variable that already knows the ID of the list item to display.

Both operations above will provide a display of the current salary for the employee.

You can now take this a step further and when using the variable displayed in a control method, you can use it to validate against the new entry. And if the new entry is less than the previous you can post a message.

0 Kudos