Solved

Need to save the originator/form submitter name and details

  • 23 October 2018
  • 4 replies
  • 5 views

I have a simple form that goes through an approval workflow process. We have configured for K2five to set the properties of the Requested By text box to Current User Display Name, and the Requested Date text box to current date.

 

Our issue is that once the form has been created, each time someone else goes into the form, these fields keep overwriting the Originator's information, even during the workflow approval task process. What step am I missing? I'm fairly new to building in K2, so any help is appreciated.

 

 

icon

Best answer by tbyrne777 23 October 2018, 16:44

View original

4 replies

Badge +11

How about adding a condition before you set the fields?  You would only set the fields if they do not already have a value.  This logic would be after the data is loaded into the form for subsequent viewers.

 

If the Originator Name text box is empty

   then set the Originator Name Text box to the system property

 

Another option would be to only populate that value when the row is initially created.

 

If that helps, please click the Kudos button.

 

David

Userlevel 5
Badge +13

Do you have a place to save the original originator and form Submitter, and then read it back in when the form reopens? You have some options here, either storing this information in a SQL table with a unique ID related to the instance of the form, which you'd read back in on form intialize. Or, when the form is submitted, store these values as data field on your worklfow and give them back to the form as parameters for subsequent tasks.

i have a place to save the original originator and form submitter. How would I go about using  your second option:

 

Or, when the form is submitted, store these values as data field on your worklfow and give them back to the form as parameters for subsequent tasks.

 

And what would that look like once the workflow process is complete and people would like to view the form/information for history?

Userlevel 5
Badge +13

On the workflow process definition, create two data fields. We will call them "Form Originator" and "Form Submitter". On initial submit of your form, when you start the workflow process, you'll have the option to set data fields in the new workflow process instance. Pass along the values being displayed on your form to these workflow process data fields.

 

Create two new parameters on your form, also call them "Form Originator" and "Form Submitter". In the workflow when you create your task, pass through the data fields to their corresponding form parameter. Then in the form intialize rules, use these parameter values if they have a value.

Reply